[issue2636] Adding a new regex module (compatible with re)
report at bugs.python.org
Fri Sep 2 19:40:22 CEST 2011
Matthew Barnett <python at mrabarnett.plus.com> added the comment:
The least disruptive change would be to have a NEW flag for the new behaviour, as at present, and an OLD flag for the old behaviour.
Currently the default is old behaviour, but in the future it will be new behaviour.
The differences would be:
Old behaviour : New behaviour
Global inline flags : Positional inline flags
Can't split on zero-width match : Can split on zero-width match
Simple sets : Nested sets and set operations
The only change would be that nested sets wouldn't be supported in the old behaviour.
There are also additional escape sequences, eg \X is no longer treated as "X", but as they look like escape sequences you really shouldn't be relying on that. (It's similar to writing Windows paths in non-raw string literals: "\T" == "\\T", but "\t" == chr(9).)
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list