[issue39687] re.sub behaves inconsistent between versions with * repetition qualifier
Serhiy Storchaka
report at bugs.python.org
Wed Feb 19 08:24:52 EST 2020
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
It is correct and documented behavior. ".*" matches two substrings: the whole string "bc" and an empty string at the end of the string.
See https://docs.python.org/3/library/re.html#re.sub and https://docs.python.org/3/whatsnew/3.7.html#changes-in-the-python-api.
The behavior before 3.7 was incorrect.
----------
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39687>
_______________________________________
More information about the Python-bugs-list
mailing list