jlongino has asked for the wisdom of the Perl Monks concerning the following question:
use strict; my @strs = ('ABC','aZ','CC','AZ','ZZ','?A','W1','A ',' ','..','A','1' +,''); foreach (@strs) { if (/^[A-Z]{2}$/) { print "PASS: "; } else { print "## FAIL: "; } print "'$_'\n"; }
--Jim
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple Regex for Alpha string
by Masem (Monsignor) on Nov 14, 2001 at 00:55 UTC | |
by jlongino (Parson) on Nov 14, 2001 at 01:05 UTC | |
by wog (Curate) on Nov 14, 2001 at 02:40 UTC | |
by demerphq (Chancellor) on Nov 14, 2001 at 03:31 UTC | |
|
(tye)Re: Simple Regex for Alpha string
by tye (Sage) on Nov 14, 2001 at 01:40 UTC | |
by jlongino (Parson) on Nov 14, 2001 at 02:13 UTC |