ask for a RE pattern to match TABLE in html

Jonathan Gardner jgardner at jonathangardner.net
Mon Jun 30 16:21:54 EDT 2008


On Jun 27, 10:32 am, "David C. Ullrich" <dullr... at sprynet.com> wrote:
> (ii) The regexes in languages like Python and Perl include
> features that are not part of the formal CS notion of
> "regular expression". Do they include something that
> does allow parsing nested delimiters properly?
>

In perl, there are some pretty wild extensions to the regex syntax,
features that make it much more than a regular expression engine.

Yes, it is possible to match parentheses and other nested structures
(such as HTML), and the regex to do so isn't incredibly difficult.
Note that Python doesn't support this extension.

See http://www.perl.com/pub/a/2003/08/21/perlcookbook.html



More information about the Python-list mailing list