Aiui "The Future of Python Regexes" SO answer at http://stackoverflow.com/a/7066413/1077672 written by regex (and Perl) expert Tom Christiansen (and last updated by him in 2012) is still good info.
In brief, https://pypi.python.org/pypi/regex appears to be the path forward for Python. This engine is much closer to the power and Unicode compatibility of Perl 5's default regex engine.
= About Perl 5 regexes =
Aiui the default Perl 5 regex engine is significantly faster than the 're' regex feature included with Python 2. I don't know how it compares to the new 'regex' module.
Regexes in Perl have the advantage/disadvantage that they are syntactically integrated in to the language (a disadvantage if you don't like it being integrated).
Since Perl 5.10, a different regex engine can be plugged in and used without requiring any change in code that uses regexes (unless an engine uses a different syntax of course). (But it takes a lot of effort to package a regex engine up for use with Perl 5.)
A given regex engine can be extended using the overload module. Extending is relatively easy.
= About Perl 6 regexes =
A whole new ball game, two decades ahead of Perl 5 regexes.
Generally matches Perl 5 regexes feature-for-feature but with a much cleaner syntax. More importantly, unifies regexes and grammars.
Currently way slower than Python or Perl 5 regexes. Supposedly will eventually (5 years? 10?) incorporate all the key optimizations in the Perl 5 engine and become faster than Perl 5 regexes.
Aiui "The Future of Python Regexes" SO answer at http://stackoverflow.com/a/7066413/1077672 written by regex (and Perl) expert Tom Christiansen (and last updated by him in 2012) is still good info.
In brief, https://pypi.python.org/pypi/regex appears to be the path forward for Python. This engine is much closer to the power and Unicode compatibility of Perl 5's default regex engine.
= About Perl 5 regexes =
Aiui the default Perl 5 regex engine is significantly faster than the 're' regex feature included with Python 2. I don't know how it compares to the new 'regex' module.
Regexes in Perl have the advantage/disadvantage that they are syntactically integrated in to the language (a disadvantage if you don't like it being integrated).
Since Perl 5.10, a different regex engine can be plugged in and used without requiring any change in code that uses regexes (unless an engine uses a different syntax of course). (But it takes a lot of effort to package a regex engine up for use with Perl 5.)
A given regex engine can be extended using the overload module. Extending is relatively easy.
= About Perl 6 regexes =
A whole new ball game, two decades ahead of Perl 5 regexes.
http://en.wikipedia.org/wiki/Perl_6_rules
http://doc.perl6.org/language/grammars
https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
Generally matches Perl 5 regexes feature-for-feature but with a much cleaner syntax. More importantly, unifies regexes and grammars.
Currently way slower than Python or Perl 5 regexes. Supposedly will eventually (5 years? 10?) incorporate all the key optimizations in the Perl 5 engine and become faster than Perl 5 regexes.