Message128923
There's a peculiar and difficult to find bug in the re.sub method. Try following example:
>>> text = 'X'*4096
>>> nt = re.sub(u"XX", u".", text, re.U)
>>> nt
u'............XXXXXXXXXXXXXXXXXXX' (only 32 dots, the rest of the string is not changed).
If I first compile regexp, and then perform compiled_regexp.sub, everything seems to work correctly. |
|
Date |
User |
Action |
Args |
2011-02-20 22:28:14 | Eugene.Morozov | set | recipients:
+ Eugene.Morozov |
2011-02-20 22:28:13 | Eugene.Morozov | set | messageid: <1298240893.99.0.359755744829.issue11262@psf.upfronthosting.co.za> |
2011-02-20 22:28:09 | Eugene.Morozov | link | issue11262 messages |
2011-02-20 22:28:09 | Eugene.Morozov | create | |
|