collywobble has asked for the wisdom of the Perl Monks concerning the following question:
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"; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with regex
by robartes (Priest) on Feb 05, 2003 at 07:42 UTC | |
|
Re: Patterns
by insensate (Hermit) on Feb 05, 2003 at 07:00 UTC |