From 4fd62ace17390b0b9cc37c55e88582134ec18c28 Mon Sep 17 00:00:00 2001 From: hjg <hjg@123.com> Date: 星期二, 09 七月 2024 16:21:38 +0800 Subject: [PATCH] 正则新能源 --- JavaSource/com/mandi/common/ParamFileter/RegexCheck.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/JavaSource/com/mandi/common/ParamFileter/RegexCheck.java b/JavaSource/com/mandi/common/ParamFileter/RegexCheck.java index ae26952..44dbb4d 100644 --- a/JavaSource/com/mandi/common/ParamFileter/RegexCheck.java +++ b/JavaSource/com/mandi/common/ParamFileter/RegexCheck.java @@ -291,7 +291,11 @@ if(vehicleID.length()==7){ regex="[浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块鏃燷{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9鎸傚璀︽腐婢砞{1}$"; // regex="[\u4e00-\u9fa5]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9鎸傚璀︽腐婢砞{1}$"; - }else{ + }else if(vehicleID.length()==8){ +// regex = "^([浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块鏃燷[a-zA-Z](([ADF](?![IO])[A-Z0-9][0-9]{4})|([0-9]{5}[DF])))$"; + //regex = "^([浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块鏃燷[a-zA-Z](([A-Z](?![IO])[A-Z0-9][0-9]{4})|([0-9]{5}[DF])))$"; + regex = "^[浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块鏃燗-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([A-HJ-K][A-HJ-NP-Z0-9][0-9]{4}$))"; + } else{ regex="[浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块鏃燷{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))"; // regex="[\u4e00-\u9fa5]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))"; } -- Gitblit v1.9.3