>? RemoveSpecial("832i#@^&*ds7fha8732h909&*%$*%9") > >FUNCTION RemoveSpecial > PARAMETER pcString > LOCAL lcNew, i, lcSymbol > > lcNew = "" > * loop through string and remove everything except letters and numbers > FOR i = 1 to len(pcString) lcSymbol=substr(pcString,i,1) > IF IsDigit(lcSymbol) or IsAlpha(lcSymbol) > lcNew = lcNew + substr(pcString,i,1) > ENDIF > ENDFOR >RETURN UPPER(lcNew) > >This is if we can not determine in advance all 'bad' characters. Otherwise my solution is simpler for huge strings. Also we can check FoxTools functions: (Filter?, Reduce)