[issue9179] Lookback with group references incorrect (two issues?)

Matthew Barnett report at bugs.python.org
Tue Jul 6 17:52:07 CEST 2010


Matthew Barnett <python at mrabarnett.plus.com> added the comment:

Should a regex compile if a group is referenced before it's defined?

Consider this:

    (?:(?(2)(a)|(b))+

Other regex implementations permit forward references to groups.

BTW, I had a look at the re module, found it too difficult, and so started on my own implementation of the matching engine (available on PyPI).

----------

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


More information about the Python-bugs-list mailing list