Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2015-11-29 07:57 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (749 votes), past polls