/**
* 是否包含中文
**/
public static boolean isContainsChinese(String str) {
String regEx = "[\u4e00-\u9fa5]";
Pattern pat = Pattern.compile(regEx);
Matcher matcher = pat.matcher(str);
boolean flg = false;
if (matcher.find()) {
flg = true;
}
return flg;
}
时间: 2024-10-14 01:00:49