java判断是否为汉字
public static boolean isChinese(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; }
public static boolean isChinese(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; }