From 52c60fcaea97cece4b39987a3b8b248964dbe280 Mon Sep 17 00:00:00 2001 From: kaiyu <404897439@qq.com> Date: Tue, 02 Nov 2021 11:28:23 +0800 Subject: [PATCH] screen-api 修改计算首要污染物BUG --- screen-common/src/main/java/com/moral/util/RegexUtils.java | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/screen-common/src/main/java/com/moral/util/RegexUtils.java b/screen-common/src/main/java/com/moral/util/RegexUtils.java index 62aafc1..eca464c 100644 --- a/screen-common/src/main/java/com/moral/util/RegexUtils.java +++ b/screen-common/src/main/java/com/moral/util/RegexUtils.java @@ -21,11 +21,11 @@ /** * ������������ * - * @param password ������������������ ������ , ��������� , ������������������������3 ��� 20 ������ + * @param password ������������������ ������ , ��������� , ������������������������6 ��� 20 ������ * @return ���������������true���������������������false */ public static boolean checkPassword(String password) { - String regex = "[0-9a-zA-Z_]\\w{2,19}"; + String regex = "[0-9a-zA-Z_]\\w{5,19}"; return password.matches(regex); } @@ -195,4 +195,17 @@ return Pattern.matches(regex, ipAddress); } + /** + * @Description: ��������������������������������� + * @Param: [str] + * @return: boolean + * @Author: ��������� + * @Date: 2021/4/21 + */ + public static boolean checkContainChinese(String str){ + Pattern p = Pattern.compile("[\u4e00-\u9fa5]"); + Matcher matcher = p.matcher(str); + return matcher.find(); + } + } \ No newline at end of file -- Gitblit v1.8.0