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-25.13:08:16
SpamBayes Score 6.57471e-05
Marked as misclassified No
Message-id <1222348097.51.0.94697607419.issue1647489@psf.upfronthosting.co.za>
In-reply-to
Content
Perl gives this result for your new expression:

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

I think it has to do with not thinking of a string as a sequence of
characters, but as a sequence of characters separated by null-space. 
Null-space is can be captured, but ONLY if it is part of a zero-width
match, and once captured, it can no longer be captured by another
zero-width expression.  This is in keeping which what I see as Perl's
behaviour, namely that the (q*) group never participates in the first
match because, initially the (^z*) captures it.  OTOH, when it gets to
the null-space AFTER the 'abc' capture, the (^z*) cannot participate
because it has a "at-beginning" restriction.  The evaluator then moves
on to the (q*), which has no such restriction and this time it matches,
consuming the final null-space.
History
Date User Action Args
2008-09-25 13:08:17timehorsesetrecipients: + timehorse, niemeyer, jfrechet, rsc, mrabarnett
2008-09-25 13:08:17timehorsesetmessageid: <1222348097.51.0.94697607419.issue1647489@psf.upfronthosting.co.za>
2008-09-25 13:08:16timehorselinkissue1647489 messages
2008-09-25 13:08:16timehorsecreate