print "whatever" if "foobar" =~ /(?<=o*)b/; # print whatever if foobar has a b preceeded by any number of o's