Project

General

Profile

Actions

Added in 1.9.3

$iptype(text)

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

Parameters

Parameter Description
text The text to validate.

Properties

Property Description
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)

Updated by Per Amundsen over 1 year ago · 3 revisions

Also available in: PDF HTML TXT