Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Match a Range of IP's

by TedPride (Priest)
on Oct 01, 2004 at 09:42 UTC ( #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
Node Status?
node history
Node Type: note [id://395577]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2021-01-17 13:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?