xiexiaoxia
String regex = "^1[345678]\\d{9}$";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher("111111111111");
        if(!matcher.matches()){
            System.out.println("格式不正确");
        }

 

分类:

技术点:

相关文章: