Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm iterating through a list of IP's and trying to match them against the above format.123.145.[146-149].2 or 135.168.[10-115].[0-125] or some combination of the two
Any suggestions? Can I use the format to build my regex (i.e.):
my $RegEx = qw/123.145.[146-149].2/; print "$IP\n" if ($IP =~ /$RegEx/);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: IP Filtering RegEx needed
by dave_the_m (Monsignor) on Sep 15, 2004 at 14:24 UTC | |
|
Re: IP Filtering RegEx needed
by EdwardG (Vicar) on Sep 15, 2004 at 14:34 UTC | |
|
Re: IP Filtering RegEx needed
by Random_Walk (Prior) on Sep 15, 2004 at 15:03 UTC | |
by EdwardG (Vicar) on Sep 15, 2004 at 15:47 UTC | |
by Random_Walk (Prior) on Sep 15, 2004 at 16:20 UTC | |
by EdwardG (Vicar) on Sep 15, 2004 at 16:31 UTC | |
by Anonymous Monk on Sep 15, 2004 at 15:21 UTC | |
|
Re: IP Filtering RegEx needed
by Roger (Parson) on Sep 15, 2004 at 14:22 UTC | |
|
Re: IP Filtering RegEx needed
by Dietz (Curate) on Sep 15, 2004 at 14:29 UTC | |
by Fletch (Bishop) on Sep 15, 2004 at 14:37 UTC | |
by Dietz (Curate) on Sep 15, 2004 at 14:50 UTC | |
by Dietz (Curate) on Sep 15, 2004 at 16:17 UTC |