LOCAL laList[1], lcTestString lcTestString = 'test;test;test1;test;test1;test2' lcNewString = ";" FOR i =1 TO ALINES(laList,lcTestString, .T., ";") IF NOT ( ";" + PROPER(laList[i]) + ";" $ lcNewString ) lcNewString = lcNewString + PROPER(laList[i]) + ";" ENDIF ENDFOR lcNewString = SUBSTR(lcNewString , 2, LEN(lcNewString) -2)>I have a text string as follows: