Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Yes, this is an intended change. Your pattern matches an empty string at the 
end of the input string. It was a bug in earlier Python versions that re.sub() 
didn't replace empty matches adjacent to a previous non-empty match.

It is not clear what is the purpose of your code, but adding anchors or 
replacing * with + usually helps.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34982>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to