Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing out parts of text file
Message
From
04/02/2008 03:44:41
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01288936
Message ID:
01288950
Views:
14
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform