Identifying an IP address
wouter
wouter.abraham at scarlet.be
Fri Apr 6 11:17:09 EDT 2007
JB,
On 06 Apr 2007, at 11:06, jbv wrote:
-snip-
>
> 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...
if you want to check an ip number without a port number attached try
this:
put "^((\d|[01]?\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[01]?\d\d|2[0-4]\d|25
[0-5])$" into myRegex
Greetings,
Wouter
More information about the use-livecode
mailing list