FierceMoose has asked for the wisdom of the Perl Monks concerning the following question:
Greetings All.
I'm seeking the greater wisdom of PerlMonks on patter matching issue that's been plaguing me. It's probably something obvious, but I appear to be blind to it. Running a simple script that query's LDAP, via Net::LDAP, and have it report back Seat data that does not follow the expected pattern, easier explained by Test Cases below. Here's the snippet of code used for processing data retrieved from LDAP:
for($c=0; $c < $totalFound; $c++) { my $SeatLoc = $entries[$c]->get_value('SeatLocation'); if ($SeatLoc =~ /(\b[A-Z]{1}\d{1}\.\d+[A-Z]*)/) { print "Valid Seat Found: $SeatLoc.\n"; } else { print "Found Invalid Seat: $SeatLoc\n"; } }
Believe I've got the correct RegEx for the pattern match, tested on 'My Regex Tester' but cannot seem to get it to work in Perl, doesn't match on a single one.
Test Cases:
Please help me find my way back to the right path.
Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl will not match my RegEx pattern....
by AnomalousMonk (Archbishop) on Mar 18, 2014 at 17:45 UTC | |
by FierceMoose (Initiate) on Mar 19, 2014 at 14:52 UTC | |
by choroba (Cardinal) on Mar 19, 2014 at 15:23 UTC | |
by AnomalousMonk (Archbishop) on Mar 19, 2014 at 18:22 UTC | |
Re: Perl will not match my RegEx pattern....
by Bloodnok (Vicar) on Mar 18, 2014 at 17:39 UTC | |
Re: Perl will not match my RegEx pattern....
by Jer2911 (Acolyte) on Mar 18, 2014 at 19:31 UTC | |
by AnomalousMonk (Archbishop) on Mar 18, 2014 at 21:10 UTC | |
Re: Perl will not match my RegEx pattern....
by FierceMoose (Initiate) on Mar 19, 2014 at 14:18 UTC | |
by hazylife (Monk) on Mar 19, 2014 at 14:44 UTC |