Problem with Regular Expressions?
Hans Nowak
wurmy at earthlink.net
Sat May 4 21:38:14 EDT 2002
Allan Crooks wrote:
> I was wondering if anyone could tell me if what I want to do is
> possible with a solitary single expression?
>
> I have a webpage that I want to process, which contains multiple
> <table>'s. I want to find a particular table, which will contains a
> particular word. I want to be able to return each row in the table.
>
> The regular expression would probably have to match the entire table,
> with grouping needing to be used to capture each row.
Using a regular expression for this probably isn't a good idea.
Take a look at the sgmllib and htmllib modules in the standard
library for a different approach.
--
Hans (base64.decodestring('d3VybXlAZWFydGhsaW5rLm5ldA=='))
# decode for email address ;-)
The Pythonic Quarter:: http://www.awaretek.com/nowak/
More information about the Python-list
mailing list