ironpython3
ironpython3 copied to clipboard
Support modifier spans in re
For example:
assert re.match('(?i)g(?-i:v)r', "GVR") is None
Modifier spans are used by the string
module in 3.6.
See https://docs.python.org/3/whatsnew/3.6.html#re
https://github.com/IronLanguages/ironpython3/pull/1466 partially resolves this by letting the expression flow through to the .NET regex engine which supports imnsx
(see Regular Expression Options).
However there are still some failures such as:
re.match(r'(?-x: a) b', ' ab', re.VERBOSE)