http://qs1969.pair.com?node_id=179130


in reply to Regex matching

This should work according to your example:

#!/usr/bin/perl use warnings; use strict; my $string = "UFOFH 33603 01231 /0000 0024/ 1024/ 2025/ 3027/ 4030/ 50 +25/ 6028/ 7060/ 8081/ 9098/ 0110/ 1107/ 2106/ 3102/ 4080/ 5065/ 6057/ +"; if ( $string =~ m#UFOFH ([\d/]{5}\s?){4,27}# ) { print "$string\n"; }

Update: I updated the regexp to be a little prettier. Need more coffee...