验证移动联动电信号码

阅读更多
// System.out.println(MD5Helper.getMD5("222").equals("bcbe3365e6ac95ea2c0343a2395834dd"));
//验证移动号码
System.out.println(Pattern.matches("^1(3[4-9]|4[7]|5[012789]|8[2378])\\d{8}$","13572564562"));
//验证联通号码
System.out.println(Pattern.matches("^1(3[0-2]|4[5]|5[56]|8[56])\\d{8}$","13072564562"));
//验证电信号码
System.out.println(Pattern.matches("^1(3[3]|5[3]|8[09])\\d{8}$","13372564562"));

你可能感兴趣的:(验证移动联动电信号码)