Regular Expression question

Anthra Norell anthra.norell at tiscalinet.ch
Tue Aug 22 05:57:47 EDT 2006


Steve,
   I thought Fredrik Lundh's proposal was perfect. Are you now saying it doesn't solve your problem because your description of the
problem was incomplete? If so, could you post a worst case piece of htm, one that contains all possible complications, or a
collection of different cases all of which you need to handle?

Frederic

----- Original Message -----
From: <stevebread at yahoo.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Monday, August 21, 2006 11:35 PM
Subject: Re: Regular Expression question


> Hi, thanks everyone for the information! Still going through it :)
>
> The reason I did not match on tag2 in my original expression (and I
> apologize because I should have mentioned this before) is that other
> tags could also have an attribute with the value of "adj__" and the
> attribute name may not be the same for the other tags. The only thing I
> can be sure of is that the value will begin with "adj__".
>
> I need to match the "adj__" value with the closest preceding tag1
> irrespective of what tag the "adj__" is in, or what the attribute
> holding it is called, or the order of the attributes (there may be
> others). This data will be inside an html page and so there will be
> plenty of html tags in the middle all of which I need to ignore.
>
> Thanks very much!
> Steve
>
> --
> http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list