Java校验手机是否是手机号或者座机号 private static final String regExp = "^(1[3|4|5|6|7|8|9])\\d{9}$|^0\\d{2,3}-?\\d{7,8}$"; attern pattern = Pattern.compile(regExp); Matcher matcher = pattern.matcher(param.getPhone()); boolean result = matcher.matches(); //返回true表示是手机号或者电话号