Message313255
This is intentional change.
Prior to 3.7 re.sub() didn't replace empty matches adjacent to a previous non-empty match. In 3.7 it does. Together with other changes this made all four functions that search multiple matches of the pattern (re.findall(), re.finditer(), re.split() and re.sub()) consistent.
In your example the pattern matches not only from " COLLATE" to the end of input string, but an empty string at the end of input string. If you do not want matching an empty string, just remove the '?' qualifier. |
|
Date |
User |
Action |
Args |
2018-03-05 16:09:35 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, zzzeek |
2018-03-05 16:09:35 | serhiy.storchaka | set | messageid: <1520266175.33.0.467229070634.issue32998@psf.upfronthosting.co.za> |
2018-03-05 16:09:35 | serhiy.storchaka | link | issue32998 messages |
2018-03-05 16:09:35 | serhiy.storchaka | create | |
|