/**
* 验证手机号码是否合法
*/
public static boolean validatePhoneNumber(String mobiles) {
String telRegex = "^((13[0-9])|(15[^4])|(18[0-9])|(17[0-8])|(147,145))\\d{8}$";
return !TextUtils.isEmpty(mobiles) && mobiles.matches(telRegex);
}
java 正则表达式手机号码验证
猜你喜欢
转载自blog.csdn.net/liu_qunfeng/article/details/82527930
今日推荐
周排行