Message334601
It matches, and the span is (0, 2).
The only way that it can match like that is for the capture group to match the 'a', and the final 'b' to match the 'b'.
Therefore, re.search(r'(ab|a)*b', 'ab').groups() should be ('a', ), as it is for the pattern with a greedy repeat. |
|
Date |
User |
Action |
Args |
2019-01-30 23:11:45 | mrabarnett | set | recipients:
+ mrabarnett, tim.peters, effbot, rhettinger, ezio.melotti, serhiy.storchaka, Ma Lin, davisjam |
2019-01-30 23:11:43 | mrabarnett | set | messageid: <1548889903.99.0.66031702265.issue35859@roundup.psfhosted.org> |
2019-01-30 23:11:43 | mrabarnett | link | issue35859 messages |
2019-01-30 23:11:43 | mrabarnett | create | |
|