java common

一、java正则表达式

String p = "^1(34|35|36|37|38|39|47|58|59|50|51|52|57|84|87|88)[0-9]{8}$";
  if(StringUtils.isEmpty(recommmobile) || !Pattern.matches(p, recommmobile)) {
   error.setErrorMsg("尊敬的客户:请输入正确的中国移动手机号码!");
   error.setErrorUrl("QueryShortNoGroup.action");//返回URL
   return ret;
  }

 

你可能感兴趣的:(java)