Python 2.7 re.IGNORECASE broken in re.sub?
alex at moreati.org.uk
Mon Aug 16 15:33:31 CEST 2010
On Aug 16, 1:46 pm, Alex Willmer <a... at moreati.org.uk> wrote:
> "Note that the (?x) flag changes how the expression is parsed. It
> should be used first in the expression string, or after one or more
> whitespace characters. If there are non-whitespace characters before
> the flag, the results are undefined.
Hmm, I found a lot of instances that place (?iLmsux) after non-
including two from the Python unit tests, re_test.py lines 109-110.
Perhaps the documentation is overly cautious..
More information about the Python-list