public static boolean isMobile(final String str) {

    Pattern p = null;
    Matcher m = null;
    boolean b = false;
    p = Pattern.compile("^[1][3,4,5,7,8][0-9]{9}$"); // 验证手机号
    m = p.matcher(str);
    b = m.matches();
    return b;
}

Jame
13 声望1 粉丝

专注技术开发、自动化办公脚本、数据处理、数据爬取...Wecat:W13611455764