Message73789
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. |
|
Date |
User |
Action |
Args |
2008-09-25 13:08:17 | timehorse | set | recipients:
+ timehorse, niemeyer, jfrechet, rsc, mrabarnett |
2008-09-25 13:08:17 | timehorse | set | messageid: <1222348097.51.0.94697607419.issue1647489@psf.upfronthosting.co.za> |
2008-09-25 13:08:16 | timehorse | link | issue1647489 messages |
2008-09-25 13:08:16 | timehorse | create | |
|