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


in reply to Re: Greedy regexp matching: differences between man page and implementation?
in thread Greedy regexp matching: differences between man page and implementation?

This is an even more obvious:
$_='abcdefgh'; /^(a|abcdefg)(h|bc)/; print "[$1] [$2]\n";
It prints [a] [bc]. The regexp engine clearly doesn't run through all possible combinations within (..|..|..) patterns.