in reply to Greediness of * vs. greediness of +
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
|
|---|