首页 > 代码库 > java电话号验证

java电话号验证

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()+"---");

}

java电话号验证