Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find and Replace in huge text file
Message
From
27/09/2005 15:28:04
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01053411
Message ID:
01053613
Views:
24
20 minutes for 25Mb! No way. VFP has never been that much slow. It might take around 2 secs though.
Cetin

>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform