regular expressions: grabbing variables from multiple matches

Alex Martelli aleaxit at yahoo.com
Thu Jan 4 08:53:29 EST 2001


"Fredrik Lundh" <fredrik at effbot.org> wrote in message
news:JPY46.2909$AH6.513673 at newsc.telia.net...
    [snip]
> Heather Lynn White wrote:
> > Suppose I have a regular expression to grab all variations on a meta
tag,
    [snip]
> but supposing you really are out to extract meta tags from an
> HTML document, it might be a better idea to use the HTML/SGML
> parser in sgmllib:

*Hear, hear*!!!  I keep forgetting to remind people that, while
re's are OK for many tasks, using them to parse structured content
is hard, unrewarding work -- using the already-supplied Python
library modules is MUCH better.  Thanks <F> for reminding us!


Alex






More information about the Python-list mailing list