[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

Jacques Grove report at bugs.python.org
Tue Nov 2 03:49:47 CET 2010


Jacques Grove <jacques at tripitinc.com> added the comment:

OK, I think this might be the last one I will find for the moment:

$ cat test.py
import re, regex

text = "test?"
regexp = "test\?"
sub_value = "result\?"
print repr(re.sub(regexp, sub_value, text))
print repr(regex.sub(regexp, sub_value, text))


$ python test.py
'result\\?'
'result?'

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2636>
_______________________________________


More information about the Python-bugs-list mailing list