Should be :
![]()
Function Test(param As String) As String Const strReplace As String = ", " With CreateObject("VBScript.RegExp") .Global = True .Pattern = "[\s,-]{2,}" If .Test(param) Then Test = .Replace(param, strReplace) If Left$(Test, Len(strReplace)) = strReplace Then Test = Mid$(Test, Len(strReplace) + 1) End If End With End Function
Bookmarks