if ($str =~ m/^[S|Q]\w+[e|y]\(\$_\w{3,4}\)/ig){ print $& . "\n"; }