Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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...


Comment on Re: Regex matching
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
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 contemplating the Monastery: (4)
As of 2014-09-02 04:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (20 votes), past polls