http://qs321.pair.com?node_id=372786

stijnvs has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks,

The perlre man page states:

By default, a quantified subpattern is "greedy", that is, it will match as many times as possible (given a particular starting location) while still allowing the rest of the pattern to match.

Hence, when trying the following simple program:

"abc" =~ /(a|ab)*(bc|c)/; print "$1 $2\n";

One would expect the output to be ab c. Executing the above program with Perl version 5.8.3 returns a bc however.

My question now is: which one is wrong, me, the man page or the implementation?