Template:IsIP

From Terraria Wiki
Jump to navigation Jump to search
Template-info.svg Documentation The documentation below is transcluded from Template:IsIP/doc. (edit | history)

This template is used to determine if an input string is a valid IP. It recognizes both IPv4 and IPv6 (case-insensitive).

Usage

{{ isIP | <string to check> }}

First unnamed parameter

The string that is to be checked whether it is a valid IP or not.

Examples

Code Result
{{isIP|127.0.0.1}} y
{{isIP|192.168.255.255}} y
{{isIP|192.168.255.256}}
{{isIP|2345:0425:2CA1:0000:0000:0567:5673:23bf}} y
{{isIP|2345:0425:2CA1:0000:0000:0567:5673:23bg}}