Regular Expressions
Diez B. Roggisch
deetsNOSPAM at web.de
Tue Apr 27 05:08:09 EDT 2004
Benjamin Arai wrote:
> I would just use the re library because regular expressions will allow
> you to get right down to the data on the first try anyways without
> further parsing. If you use the htmlparser library first it may cause
> some unneeded processing time.
That depends on how well the html is written. You often end up writing
complicated regexes to extract data from certain special cases, and
sometimes even with two passes. So in general, its better to use the right
tool for the job - if speed _is_ a concern you can still try to optimize.
--
Regards,
Diez B. Roggisch
More information about the Python-list
mailing list