/**
* 添加或修改数据
*/
@RequestMapping(value="/save",method=RequestMethod.POST)
@ResponseBody
public RestResult save(EduSchoolMain entity, HttpServletRequest request,HttpServletResponse response) {
//替换(所有中文替换成英文的)
entity.setTel(
entity.getTel()
.replaceAll("(", "\\(")
.replaceAll(")", "\\)")
.replaceAll(",", ",")
.replaceAll("-", "")
.replaceAll("—", "")
.replaceAll(" ", "")
);
String[] strings = entity.getTel().split(",");
List<String> list = new ArrayList<>();
for (String s : strings) {
String tmp[] = s.split("\\(");
//正则
String regMob = "^((13[0-9])|(15[^4
手机号正则验证以及344分割
最新推荐文章于 2023-04-14 10:03:33 发布