校验手机号码是否合法
/**
* 校验手机号码是否合法.
* @return boolean
*/
public static boolean isMobileNumber(final String mobile) {
if (StringUtils.isBlank(mobile)) {
return false;
}
final String reg = "^((\\+?86)|(\\(\\+86\\)))?(13[0-9][0-9]{8}|14[0-9]{9}|15[0-9][0-9]{8}|17[0-9][0-9]{8}|18[0-9][0-9]{8})$";
Pattern pattern = Pattern.compile(reg);
Matcher matcher = pattern.matcher(mobile);
return matcher.matches();
}