# Takes a string and a list of REs. Returns true or false # depending on whether all of them match. sub match_all { my $str = shift; foreach my $re (@_) { return 0 unless $str =~ /$re/; } return 1; }