Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Regex matching

by mikeirw (Pilgrim)
on Jul 03, 2002 at 12:06 UTC ( #179130=note: print w/replies, xml ) Need Help??


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...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://179130]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2023-03-22 08:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?