public static void main(String args[]) throws Exception {
Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$");
Matcher m = p.matcher("15811566026"); System.out.println(m.matches()+"---");
}
时间: 2024-10-16 19:51:43
public static void main(String args[]) throws Exception {
Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$");
Matcher m = p.matcher("15811566026"); System.out.println(m.matches()+"---");
}