/**
* 验证邮箱格式是否正确
*/
public boolean emailValidation(String email) {
String regex = "\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
return email.matches(regex);
}
2022-12-10 12:09:29
/**
* 验证邮箱格式是否正确
*/
public boolean emailValidation(String email) {
String regex = "\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
return email.matches(regex);
}