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

Mark Dickinson report at bugs.python.org
Tue Jul 6 15:30:22 CEST 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

Thanks very much for the reports.

> So I guess it's also possible that (?(n)pat1|pat2) should always fail
> that, even when len(pat1) = len(pat2)?

Yes, this seems likely to me.  Possibly even the compile stage should fail, though I've no idea how feasible it is to make that happen.

Unfortunately I'm not sure that any of the currently active Python developers is particularly well versed in the intricacies of the re module.  The most realistic option here may be just to document the restrictions on lookbehind assertions more clearly.  Unless you're able to provide a patch?

----------
nosy: +mark.dickinson, mrabarnett

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


More information about the Python-bugs-list mailing list