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

Hi, When I do "abbbbbc" =~ /(b)*?(b*?)c/ as a result I get $1="a" $2="bbbbb" which is not what I have expected. How did (b) manage to match "a"? Is this a bug or a documented behavior of the regular expressions? p.s. "abbbbbc" =~ /(b)*(b*?)c/ nicely returns $1="b" $2=""