in reply to Match a Range of IP's
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.while (<DATA>) { print if /^192.168.[1-9]\d?.([1-9]\d?\d?)$/ && $1 < 256; }
|
|---|