screen-common/src/main/java/com/moral/util/RegexUtils.java
@@ -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(); } }