in reply to Greediness of * vs. greediness of +

Below are a couple of more patterns. In the first case, the expression just isn't getting to the b's. When it sees the a, that's zero or more b's (i.e. zero).

In the second case, the "." says any first character then zero or more b's, since we got to the b's, we get them all. Same thing in the 3rd example.

"abbbbc"=~/(b*)/ && print "Found: $1\n"; #(no b's) "abbbbc"=~/.(b*)/ && print "Found: $1\n"; #bbbb "bbbbbc"=~/(b*)/ && print "Found: $1\n"; #bbbbb