使用Java判断是否是邮箱正确格式
public static boolean isEmail(String email) {
if (email == null || email.length() < 1 || email.length() > 256) {
return false;
}
Pattern pattern = Pattern.compile("^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$");
return pattern.matcher(email).matches();
}