private static String MOBILE_REGEX = "^(13[0-9]|15[012356789]|17[3678]|18[0-9]|14[57])[0-9]{8}$"; /** * 手机号正则验证 * @param str * @return */ public static boolean validateMobile(String str) { Pattern pa = Pattern.compile(MOBILE_REGEX); Matcher ma = pa.matcher(str); while (ma.find()) { return true; } return false; }