This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients ezio.melotti, mrabarnett, purificant, serhiy.storchaka, xtreak
Date 2018-10-14.14:08:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1539526128.29.0.788709270274.issue34982@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-10-14 14:08:48serhiy.storchakasetrecipients: + serhiy.storchaka, ezio.melotti, mrabarnett, xtreak, purificant
2018-10-14 14:08:48serhiy.storchakasetmessageid: <1539526128.29.0.788709270274.issue34982@psf.upfronthosting.co.za>
2018-10-14 14:08:48serhiy.storchakalinkissue34982 messages
2018-10-14 14:08:48serhiy.storchakacreate