ask for a RE pattern to match TABLE in html

David C. Ullrich dullrich at sprynet.com
Tue Jul 1 13:25:35 EDT 2008


In article 
<87bb8346-6498-4e51-b065-88d915dcff0d at p39g2000prm.googlegroups.com>,
 Jonathan Gardner <jgardner at jonathangardner.net> wrote:

> 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.

Huh. My evidently misinformed impression was that the regexes
in P and P were essentially equivalent. (I hope nobody takes
that as a complaint...)

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

-- 
David C. Ullrich



More information about the Python-list mailing list