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"; } }