更新时间:2023-02-26 12:05:00
^([01]\d{2}|2[0-4]\d|25[0-5]){3}$
分为以下几个部分:
如果您决定需要 4 个八位字节而不是 3 个,只需将最后一个 {3}
更改为 {4}
.此外,您也应该了解 IPv6.
If you decide you want 4 octets instead of 3, just change the last {3}
to {4}
. Also, you should be aware of IPv6 too.