/**
* 中文字符检查器
*/
public class ChineseCharacterCheckerUtil {
public static boolean containsChineseCharacters(String input) {
String regex = ".*[\\u4e00-\\u9fa5]+.*"; // 正则表达式匹配包含中文字符的字符串
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(input);
return matcher.matches();
}
}
07-18
5247
09-20