假如现在有一个字符串,如何快速准确的判断其是否为手机号?
public boolean isMobileNO(String mobiles) {
Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0-9]))\\d{8}$");
Matcher m = p.matcher(mobiles);
return m.matches();
}
相当简单……………………………………………………………………
转载于:https://blog.51cto.com/9070303/1540454