So, at least for my limited test case, it works.#!/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"; }; __END__ $ epsrv.pl ep_svr_12_abc_abc_theend valid label: ep_svr_12_abc_abc_theend
CU
Robartes-
In reply to Re: Problem with regex
by robartes
in thread Problem with regex
by collywobble
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |