Template:IsIP

来自Terraria Wiki
跳到导航 跳到搜索
Template-info.svg 文档 以下文档来自Template:IsIP/doc。(编辑 | 历史

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}}