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:
It prints [a] [bc]. The regexp engine clearly doesn't run through all possible combinations within (..|..|..) patterns.$_='abcdefgh'; /^(a|abcdefg)(h|bc)/; print "[$1] [$2]\n";
In Section
Seekers of Perl Wisdom