Hi,
in one of my perl scripts I am trying to check for a valid ip address,
ie in the format of XXX.XXX.XXX.XXX where x of course is digit,
and you can have ips with each feild having 1-3 digits
This is the regex I am using:
$ip_addr =~ m/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/
(I am basically trying to say, that the given string should have 3 dots and
the
characters between the dots should be integers, and everything between two
dots should have
from 1 up to 3 characters)
that's not quite working, for example it still matches strings like:
1234.123.12.1
12.34.23.5.60
12.13.456.23.
I have a hard time understanding regex
Thanks for your help!
-Lia-
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web