ep_svr_<any number/s>_<3 letters>_<3 letters>_<any characters> #!/usr/bin/perl if ($ARGV[0] =~ m/^ep_svr_\d+_[A-Za-z]{3}_[A-Za-z]{3}_\.+\z/x) { print "valid label: $ARGV[0]\n"; } else { print "invalid label: $ARGV[0]\n"; };
In reply to Problem with regex by collywobble
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |