public static boolean checkPhoneNumber(String mobiles) { Pattern pattern = null; Matcher matcher = null; boolean result = false; pattern = Pattern.compile("^[1][3,4,5,8][0-9]{9}$"); // 验证手机号 matcher = pattern.matcher(mobiles); result = matcher.matches(); return result; }
手机号验证正则表达式
猜你喜欢
转载自majunminq.iteye.com/blog/2367380
今日推荐
周排行