Message218881
"Note that split will never split a string on an empty pattern match"
You can get what you want this way:
>>> re.split(r'(\w*)', 'a funky string')
['', 'a', ' ', 'funky', ' ', 'string', '']
Or use r'(\W*)' if you don't actually want the leading and training empty strings. |
|
Date |
User |
Action |
Args |
2014-05-21 16:02:43 | r.david.murray | set | recipients:
+ r.david.murray, ezio.melotti, mrabarnett, Wellington.Fan |
2014-05-21 16:02:43 | r.david.murray | set | messageid: <1400688163.3.0.114163716696.issue21551@psf.upfronthosting.co.za> |
2014-05-21 16:02:43 | r.david.murray | link | issue21551 messages |
2014-05-21 16:02:42 | r.david.murray | create | |
|