lcStr = ALLTRIM(lcOriginalStr) && remove leading and trailing spaces >DO WHILE AT(" ", lcStr) > 0 && look for double space > lcStr = STRTRAN(lcStr, " ", " ", 1, 1) && convert double space to single >ENDDOIf you hit the reply button, you'll see the actual tags.
oReg = CREATEOBJ('VBScript.RegExp') oReg.Global = .T. && FOR ALL OCCURANCES oReg.Pattern = '\b[\t ]+\b' && Match any occurance of one or more spaces/tabs cReducedString = oReg.Replace(cUnReducedString,' ') &&Replace match with ' '