Python regular expressions just ain't PCRE

Wiseman Wiseman1024 at gmail.com
Sat May 5 11:52:15 EDT 2007


On May 5, 5:12 am, "Terry Reedy" <tjre... at udel.edu> wrote:

> I believe the current Python re module was written to replace the Python
> wrapping of pcre in order to support unicode.

I don't know how PCRE was back then, but right now it supports UTF-8
Unicode patterns and strings, and Unicode character properties. Maybe
it could be reintroduced into Python?

> I don't remember those being in the pcre Python once had.  Perhaps they are
> new.

At least today, PCRE supports recursion and recursion check,
possessive quantifiers and once-only subpatterns (disables
backtracking in a subpattern), callouts (user functions to call at
given points), and other interesting, powerful features.




More information about the Python-list mailing list