steven Michalske added the comment:

The RE compiler will not error out, with a back reference in there...
It treats the {\1} as a literal {\1} in the string.

In [180]: re.search("(\d) fo.{\1}", '3 foo{\1}').group(0)
Out[180]: '3 foo{\x01}'

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20678>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to