String check = "^\\s*\\w+(?:\\.{0,1}[\\w-]+)*@[a-zA-Z0-9]+(?:[-.][a-zA-Z0-9]+)*\\.[a-zA-Z]+\\s*$";
Pattern regex = Pattern.compile(check);
Matcher matcher = regex.matcher(email);
boolean flag = matcher.matches();
if(!flag){
msg="您输入的邮箱格式不正确!";
return msg;
}

相关文章:

  • 2022-01-23
  • 2022-12-23
  • 2021-11-21
  • 2021-12-03
  • 2021-12-28
  • 2022-01-07
  • 2021-11-16
猜你喜欢
  • 2022-12-23
  • 2022-01-07
  • 2022-01-07
  • 2021-12-13
  • 2021-12-07
相关资源
相似解决方案