Message338705
The list alternates between substrings (s, between the splits) and captures (c):
['1', '1', '2', '2', '11']
-s- -c- -s- -c- -s--
You can use slicing to extract the substrings:
>>> re.split(r'(?<=(\d))(?!\1)(?=\d)', '12111')[ : : 2]
['1', '2', '111'] |
|
Date |
User |
Action |
Args |
2019-03-23 22:13:44 | mrabarnett | set | recipients:
+ mrabarnett, ezio.melotti, Elias Tarhini |
2019-03-23 22:13:44 | mrabarnett | set | messageid: <1553379224.25.0.528578287088.issue36397@roundup.psfhosted.org> |
2019-03-23 22:13:44 | mrabarnett | link | issue36397 messages |
2019-03-23 22:13:44 | mrabarnett | create | |
|