Matthew Barnett <pyt...@mrabarnett.plus.com> added the comment: As part of issue #2636 group references now work in lookbehinds.
However, your example: (?<=(...)\1)abc will fail but: (?<=\1(...))abc will succeed. Why? Well, in lookbehinds it searches backwards. In the first regex it sees the group reference before the capture, whereas in the second it sees the group reference after the capture. (Hope that's clear! :-)) ---------- nosy: +mrabarnett _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue814253> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com