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 Mark.Shannon
Recipients Mark.Shannon, Rick Otten, ezio.melotti, mrabarnett
Date 2015-02-26.23:13:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1424992380.89.0.148668234379.issue23532@psf.upfronthosting.co.za>
In-reply-to
Content
This looks like the expected behaviour to me.
re.sub matches the leftmost occurence and the regular expression is greedy so (x|xy) will always match xy if it can.
History
Date User Action Args
2015-02-26 23:13:00Mark.Shannonsetrecipients: + Mark.Shannon, ezio.melotti, mrabarnett, Rick Otten
2015-02-26 23:13:00Mark.Shannonsetmessageid: <1424992380.89.0.148668234379.issue23532@psf.upfronthosting.co.za>
2015-02-26 23:13:00Mark.Shannonlinkissue23532 messages
2015-02-26 23:13:00Mark.Shannoncreate