> Hi,
> 
> My original regex to match ips is this:
>  "$_ =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}/;", which is ok. But matching dns name
> is still a problem. 
> 

For some definitions of "ok". Seen an IP like: 987.654.321.0 ??  Or how
about, 255.255.255.255.1.3.4.5.6 ?? I am assuming you had at least four
of those C<\d{1,3}\.> in the mix and hopefully a trailing C<$>.

If you really want to match IPs you might consider checking out the
excellent Mastering Regex book, 

(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.

Gives you a hint, so cool. You may also be interested in the
Regexp::Common suite.

<snip>

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to