[issue32998] regular expression regression in python 3.7

mike bayer report at bugs.python.org
Mon Mar 5 11:17:18 EST 2018


mike bayer <mike_mp at zzzcomputing.com> added the comment:

also, removing the "?" is not an option for me.   I need the brackets to be placed prior to the "COLLATE" subsection, but unconditionally even if the "COLLATE" section is not present.     Looking at the change the behavior seems wrong to me.   The regexp states, "match the end of the string, plus an optional "COLLATE" clause, into a capturing expression.  replace everything here, e.g. the capturing part as well as the dollar sign part, with a single instance of FOO plus the captured part".   It is entirely unintuitive to me how a second replacement would be occurring here.   I cannot prove it but I think this change is wrong.

I will try to rewrite the expression.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32998>
_______________________________________


More information about the Python-bugs-list mailing list