This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author acooke
Recipients acooke
Date 2010-07-06.10:30:28
SpamBayes Score 0.001754143
Marked as misclassified No
Message-id <1278412230.01.0.231086269384.issue9179@psf.upfronthosting.co.za>
In-reply-to
Content
I hope the above is clear enough (you need to stare at the regexps for a time) - basically, lookback with a group conditional is not as expected (it appears to be evaluated as lookahead?).  Also, some patterns compile that probably shouldn't.

The re package only supports (according to the docs) lookback on expressions whose length is known.  So I guess it's also possible that (?(n)pat1|pat2) should always fail that, even when len(pat1) = len(pat2)?

Also, the generally excellent unit tests for the re package don't have much coverage for lookback (I am writing my own regexp lib and it passes all the re unit tests but had a similar bug - that's how I found this one...).
History
Date User Action Args
2010-07-06 10:30:30acookesetrecipients: + acooke
2010-07-06 10:30:30acookesetmessageid: <1278412230.01.0.231086269384.issue9179@psf.upfronthosting.co.za>
2010-07-06 10:30:28acookelinkissue9179 messages
2010-07-06 10:30:28acookecreate