Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing out parts of text file
Message
De
04/02/2008 03:44:41
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01288936
Message ID:
01288950
Vues:
15
>>Check the Strextract() function!
>
>I used to be a HUGE fan of the STREXTRACT function until Craig Boyd showed me that Regular Expressions can be nearly 100x faster.
>
>I re-wrote some HTML parsing routines that used to take an hour or more to run using VFP string manipulation functions. With regular expression, they now take about a minute.
>
>Even using Jos's example, I ran a test on an HTML file with 5000 < img > tags. Using STRTRAN+STREXTRACT it took 9.810 seconds, but using Regular Expressions it took 0.100 seconds!

I also saw Craig's demonstartions in Phoenix last October, and was very impessed. The drawback is the learning curve and the total lack of readability. The expressions easily become pretty complex.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform