字符串是否包含中文

/**
* 是否包含中文
**/
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;
}

原文地址:https://www.cnblogs.com/haorun/p/6323577.html