Doing this with vbscript is a lot easier and faster. I once needed to convert a file with generated by a telephonecentral and needed to put a CR in between two telephone numbers. I used VFP and a 25 Mb file took over 20 minutes. Someone pointed me towards vbscript and regular expressions and that did the same trick (with a pattern) under 2 seconds. Why should this be done explicitly by VFP. Some tools sometimes perform faster.
Google on "vbscript regular expressions vfp". Lots of examples...
Regards,
Ron
>>>>>I don't understand.
>>>>>Cetin
>>>>>
>>>>>>In general case it's not simple because the STRTRAN() could create match for the next one.
>>>>>>
>>>>>>>You're right. Not hard to handle luckily.
>>>>>>>Cetin
>>>>>>>
>>>>
>>>>
>>>>* find BA replace with AB
>>>>* data ....BAA....
>>>>* BLOCKS ....BA|A...
>>>>* STRTRAN ....AB|A...
>>>>
>>>
>>>"AD00" and replace it with "BR77".
>>>Cetin
>>
>>but you are serious or you take around me.
>>
>>The issue is:
>>"find a string and replace with another string
>>without restrictions."
>
>Who said without restrictions:) Then I'd create a FLL.
>Cetin