permanentE has asked for the wisdom of the Perl Monks concerning the following question:
There must be a better way.if ($number =~ /12[89]/ ||$number =~ /1[3-9]\d/ ||$number =~ /2\d\d\/) + { $match = 1; }
For the more general subnetting problem I'm thinking I probably need to work in binary and doing the AND's and OR's etc. does anyone know of some example Perl code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex for classless IP subnets
by zengargoyle (Deacon) on Mar 21, 2003 at 23:47 UTC | |
|
Re: regex for classless IP subnets
by traveler (Parson) on Mar 22, 2003 at 00:14 UTC | |
|
Re: regex for classless IP subnets
by Kanji (Parson) on Mar 22, 2003 at 00:19 UTC | |
|
Re: regex for classless IP subnets
by Vorlin (Beadle) on Mar 22, 2003 at 00:57 UTC | |
|
Regex assertions in perl code -- Re: regex for classless IP subnets
by bart (Canon) on Mar 22, 2003 at 09:49 UTC | |
|
Re: regex for classless IP subnets
by fokat (Deacon) on Mar 23, 2003 at 03:23 UTC | |
|
Re: regex for classless IP subnets
by kal (Hermit) on Mar 24, 2003 at 19:57 UTC |