Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find and Replace in huge text file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01053411
Message ID:
01053600
Vues:
35
Oops, it wasn't done by using vbscript. We used WSH. Filesize is no longer an issue compared to VFP.

Regards,

Ron

>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform