http://qs1969.pair.com?node_id=565072


in reply to Strange result from "abbbbbc" =~ /(b)*?(b*?)c/

(...)?, (...)*, etc don't really make any sense.
((?:...)?), ((?:...)*), etc would properly capture.

Did you mean (b*?)?

if ("abbbbbc" =~ /(b*?)(b*?)c/) { print("\$1 eq '$1'\n"); # $1 eq '' print("\$2 eq '$2'\n"); # $2 eq 'bbbbb' } else { print("No match\n"); }

I'd file this under GIGO, but Perl has been changed to return a more sensible result in newer versions.