PyWart: Python regular expression syntax is not intuitive.

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Jan 26 00:28:21 EST 2012


On Wed, 25 Jan 2012 13:17:11 -0700, Ian Kelly wrote:

> 2) Permitting flags in the regular expression allows different
> combinations of flags to be in effect for different parts of complex
> regular expressions.  You can't do that just by passing in the flags as
> an argument.

I don't believe Python's regex engine supports scoped flags, I think all 
flags are global to the entire regex.

MRAB's regex engine does support scoped flags.

http://pypi.python.org/pypi/regex


-- 
Steven



More information about the Python-list mailing list