A quick check shows all strings match as you seem to expect. Can you be more specific about what you mean by "doesn't match on a single one"? As Bloodnok has asked, are you really, really sure about your data?
c:\@Work\Perl\monks>perl -wMstrict -le "my @seatlocs = (qw(A1.23BC U2.60L R2.32 C1.3L AB3.45E D45.1A), 'Some +Bldg'); ;; for my $loc (@seatlocs) { print qq{'$loc' }, $loc =~ m{ \b [A-Z]{1} \d{1} \. \d+ [A-Z]* }xms ? 'Correct' : 'Invalid'; } " 'A1.23BC' Correct 'U2.60L' Correct 'R2.32' Correct 'C1.3L' Correct 'AB3.45E' Invalid 'D45.1A' Invalid 'Some Bldg' Invalid
BTW: [A-Z]{1} is the same as [A-Z] is the same as [[:upper:]] and \d{1} the same as \d
In reply to Re: Perl will not match my RegEx pattern....
by AnomalousMonk
in thread Perl will not match my RegEx pattern....
by FierceMoose
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |