Jamie Murray wrote: > Hey Alex, > I jumped a little quick there, the previous post does work but I had a doh > moment and forgot your upper range match could only be 254 at most. > Sorry about that. > > if($num =~ > /^[0-2][0-5][0-4]\.[0-2][0-5][0-4]\.[0-2][0-5][0-4]\.[0-2][0-5][0-4]$/) ^^^ ^^^ ^^^ The digits can be 0-9, not 0-2, 0-4 or 0-5. eg: 192.168.0.1 is a legal IP You can't check a number range this way.
> after each class [] use {num,num} to adjust for a part of the ip not having > a number. > > so for example > > if($num =~ > /^[0-2]{0,1}[0-5][0-4]\.[0-2][0-5][0-4]\.[0-2][0-5][0-4]\.[0-2][0-5][0-4]$/) > matches ip's like these > "three digit 254 or less"."three digit 254 or less"."three digit 254 or > less"."three digit 254 or less". > or > "two digit 54 or less"."three digit 254 or less"."three digit 254 or > less"."three digit 254 or less" -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs