Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find and Replace in huge text file
Message
 
To
27/09/2005 12:50:51
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01053411
Message ID:
01053584
Views:
30
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform