[issue40027] re.sub inconsistency beginning with 3.7

Wayne Davison report at bugs.python.org
Fri Mar 20 13:56:29 EDT 2020


Wayne Davison <wayne.davison at mariadb.com> added the comment:

This is not the same thing because the match is anchored, so it is not adjacent to the prior match -- it is the same match. I think that r'\s*\Z' should behave the same way as r'\s*x' due to the anchor point. The current behavior is matching the same \Z twice.

----------

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


More information about the Python-bugs-list mailing list