Project

General

Profile

Added in 1.9.3

$iptype(text)

Returns "ipv4" or "ipv6" if text is is a valid IP address format.

Parameters

text - The text to validate.

Properties

-expand - Expand a ipv6 address.
.compress - Compress a ipv6 address.

Example

; Check a IPv4 address.
//echo -ag 8.8.8.8 is $iptype(8.8.8.8)

; Check a IPv6 address.
//echo -ag FE80:0000:0000:0000:0202:B3FF:FE1E:8329 is $iptype(FE80:0000:0000:0000:0202:B3FF:FE1E:8329)

Also available in: PDF HTML TXT