Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Match a Range of IP's

by TedPride (Priest)
on Oct 01, 2004 at 09:42 UTC ( [id://395577]=note: print w/replies, xml ) Need Help??


in reply to Match a Range of IP's

while (<DATA>) { print if /^192.168.[1-9]\d?.([1-9]\d?\d?)$/ && $1 < 256; }
1-99 is either one or two digits, with the first digit always being 1 or greater. Then you have to check for a valid 4th pair, which means 1-3 digits with the first being at least 1 and the whole thing being less than 256.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-24 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found