>>PMFJI so late, but I'd handle it like this:
>>
>>for i=words(s) to 1 step -1
>> lcStr=wordnum(s, i)
>> if ctod(lcStr)#{}
>> lcNstr='{^'+lcStr+'}'
>> s=strtran(s, lcStr, lcNstr)
>> endif
>>endd
>>
>>Of course, I assumed Set Library to FoxTools :)
>
>Of course! Contrast this with using VBScript.RegExp:
>
>oRegExp = CREATEOBJ('Vbscript.RegExp')
>oRegExp.pattern = "\s(\d{4}/\d{2}/\d{2})"
>s=oRegExp.replace(s," {^$1}")
>
>This requires VBSCRIPT.DLL to be installed; this comes in with the WSH or the script component runtime; I'm not sure which.
Lucky you - not only you got this nice toy, but you also have the time to play with it. How do you do if you want to remove some characters from the found selection? Like, if you had a series of strings in a ddd-00dddd format (d for digits, 0 for zeros), and you wanted to remove the leading zeros after the dash? In VFP, I'd simply s=strtran(s, '-0', '-') as long as i can find -0 string, but I have a feeling this vbaby can do better.