Pattern p = Pattern.compile("[\u4e00-\u9fa5]"); Matcher m = p.matcher(passwords); if (m.find()) { //包含 } else { //不包含 }
java判断字符串是否包含汉字
猜你喜欢
转载自blog.csdn.net/qq_37581708/article/details/72368032
今日推荐
周排行