正则表达式判断字符串是否是手机号码

public static boolean isMobile(String mobiles) {
Pattern p = Pattern.compile("^1(3|5|7|8|4)\\d{9}");
Matcher m = p.matcher(mobiles);
return m.matches();
}
posted @ 2016-09-27 15:30  TeddyYan  阅读(4143)  评论(0编辑  收藏  举报