>>With simple chrtran()
>>
>>lcNumbers = '0123456789'
>>
>>lcNewString = chrtran(m.lcString,m.lcNumbers, replicate('9',10))
>>
>>? "999-9999" $ lcNewString
>
>Very cool!
I wrote it from the head (don't have VFP here), but I know this idea from my "old" days.
If it's not broken, fix it until it is.
My Blog