On Wednesday, May 1, 2002, at 08:27 , P lerenard wrote:

> an ip address should have 3 dot and 2 (IPv4)
> so ii you check for the number of dot you have you will remove some false 
> guess
>
> Pierre
[..]
>> ###  }elsif ($nameserver =~  m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/){
>> ###          $type = "possible IP_ADDR";

I'm not quite sure I follow you -

Merely checking for three "dots" would allow for non-numeric
picks such as

        mail.arc.nasa.gov

which is clearly not an 'ip_addr' classic 'dotQuad' format.

the Regular Expression I put foward there has 'three' "dots"
that seperate digital structures of one to three digits.

I assert that this is a possible IP_Addr - since the regEx
would allow

        255.255.255.255
        0.0.0.0

as well as the RFC1918 classes and all of the 'irrationals'
eg: any decimal 256-999 in any of the places - which are
clearly not at all acceptable....

But I thought I would leave sorting those out as an exercise for the 
reader.




ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to