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 timehorse
Recipients jfrechet, mrabarnett, niemeyer, rsc, timehorse
Date 2008-09-24.18:33:08
SpamBayes Score 3.5308738e-05
Marked as misclassified No
Message-id <1222281189.05.0.713924310357.issue1647489@psf.upfronthosting.co.za>
In-reply-to
Content
Ah, I see the problem, if ptr is not incremented, then it will keep
matching the first expression, (^z*), so it would have to both 'skip'
the 'a' and NOT skip the 'a'.  Hmm.  You're right, Matthew, this is
pretty complicated.  Now, for your expression, Matthew,
r'(z*)|(^q*)|(\w+)', Perl gives:

"",undef,undef
undef,undef,"abc"
"",undef,undef

Meaning it doesn't even bother matching the ^q* since the ^z* matches
first.  This seems the logical behaviour and fits with the idea that a
Zero-Width match would both only match once and NOT consume any
characters.  An internal flag would just have to be created to tell the
2 find functions whether the current value of ptr would allow for a "No
Zero-Width Match" option on second go-around.
History
Date User Action Args
2008-09-24 18:33:09timehorsesetrecipients: + timehorse, niemeyer, jfrechet, rsc, mrabarnett
2008-09-24 18:33:09timehorsesetmessageid: <1222281189.05.0.713924310357.issue1647489@psf.upfronthosting.co.za>
2008-09-24 18:33:08timehorselinkissue1647489 messages
2008-09-24 18:33:08timehorsecreate