Message120206
Another, with backreferences:
import re, regex
text = "TEST, BEST; LEST ; Lest 123 Test, Best"
regexp = "(?i)(.{1,40}?),(.{1,40}?)(?:;)+(.{1,80}).{1,40}?\\3(\ |;)+(.{1,80}?)\\1"
print re.findall(regexp, text)
print regex.findall(regexp, text)
$ python test.py
[('TEST', ' BEST', ' LEST', ' ', '123 ')]
[('T', ' BEST', ' ', ' ', 'Lest 123 ')] |
|
Date |
User |
Action |
Args |
2010-11-02 04:52:20 | jacques | set | recipients:
+ jacques, loewis, georg.brandl, collinwinter, gregory.p.smith, jimjjewett, sjmachin, amaury.forgeotdarc, pitrou, nneonneo, giampaolo.rodola, rsc, timehorse, mark, vbr, ezio.melotti, mrabarnett, jaylogan, akitada, moreati, r.david.murray, jhalcrow |
2010-11-02 04:52:20 | jacques | set | messageid: <1288673540.59.0.224029022463.issue2636@psf.upfronthosting.co.za> |
2010-11-02 04:52:19 | jacques | link | issue2636 messages |
2010-11-02 04:52:19 | jacques | create | |
|