From 97fa274ba8dab5de6e92ccc8a36c616054d34dcc Mon Sep 17 00:00:00 2001 From: wangxin Date: Mon, 2 Jul 2018 16:27:23 +0800 Subject: [PATCH] =?UTF-8?q?IP=E5=AF=BC=E5=85=A5IP=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E6=AD=A3=E5=88=99=E8=A1=A8=E8=BE=BE=E5=BC=8F?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/nis.properties | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/nis.properties b/src/main/resources/nis.properties index 50190ccc8..8a148048f 100644 --- a/src/main/resources/nis.properties +++ b/src/main/resources/nis.properties @@ -299,9 +299,9 @@ userregion_ir_type=ir_type userregion_domian_id=DOMIAN_ID userregion_domian_str=DOMIAN_STR #IP相关验证正则 -ipv4_ip_subnet_regexp=* -ipv6_ip_subnet_regexp=* -ipv4_ip_range_regexp=* -ipv6_ip_range_regexp=* -ipv4_ip_regexp=* -ipv6_ip_regexp=* \ No newline at end of file +ipv4_ip_subnet_regexp=^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}/(3[0-2]|[1-2][0-9]|[0-9])$ +ipv6_ip_subnet_regexp=^\\s*((([0-9A-Fa-f]{1,4}:){7}(([0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]{1,4}:){6}(:|(:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}:){5}((:?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){4}(:[0-9A-Fa-f]{1,4}){0,1}((:?)|((:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}:){3}(:[0-9A-Fa-f]{1,4}){0,2}((:?)|((:[0-9A-Fa-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