Identifying an IP address

jbv jbv.silences at club-internet.fr
Fri Apr 6 05:06:30 EDT 2007



Eric,

> Bonjour,
>
> Regex!
> http://regexlib.com/default.aspx
>

yes, I'm using Regex :

 put "(\d{1,3}\.){3}\d{1,3}" into myRegex
 get matchtext(myIP , myRegex)

but this one detects only 4 patterns of 1 to 3 digits separated
by dots, hence my original concern : it will also include non
valide IPs such as 999.999.999.999, as well as private IPs...

I made quite a lot of google searches but didn't find any
regex that's 100% efficient...
I'm afraid I'll have to use a Transcript function instead, which
will probably mean slower code...

JB




More information about the use-livecode mailing list