public static boolean checkCellphone(String cellphone) {
Pattern p = Pattern.compile("^[\\u4e00-\\u9fa5]+(·[\\u4e00-\\u9fa5]+)*$");
Matcher m = p.matcher(cellphone);
return m.matches();
}
public static boolean checkCellphone(String cellphone) {
Pattern p = Pattern.compile("^[\\u4e00-\\u9fa5]+(·[\\u4e00-\\u9fa5]+)*$");
Matcher m = p.matcher(cellphone);
return m.matches();
}
本文标题:判断名字是否为中文,是否包含·或者特殊符号等
本文链接:https://www.haomeiwen.com/subject/ynhluxtx.html
网友评论