调用extracted 传入String类型的手机号

private static void extracted(String phone) {
Pattern pattern = Pattern.compile("^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$");
Matcher matcher = pattern.matcher(phone);
if (matcher.matches()) {
System.out.println("ok");
} else {
System.out.println("手机号格式错误");
}
}
博客提及调用extracted函数,并传入String类型的手机号,涉及信息技术领域的函数调用操作。

2501

被折叠的 条评论
为什么被折叠?



