//定义 REGEX_CHINESE :
private static String REGEX_CHINESE = "[\u4e00-\u9fa5]";// 中文正则
//调用
boolean b = IsContainChinese("str"); // 返回 true 或者 false
private static boolean IsContainChinese(String str) {
// 有中文则为true
boolean flag=true;
int count = 0;
Pattern p = Pattern.compile(REGEX_CHINESE);
Matcher m = p.matcher(str);
while (m.find()) {
for (int i = 0; i <= m.groupCount(); i++) {
count++;
}
}
if(count==0){
flag=false;
}
return flag;
}