邮箱验证 validateEmail
/**
* 邮箱验证
*
* @author ZengWenFeng
* @email 117791303@QQ.com
* @mobile 13805029595
* @date 2016.08.09
*/
private static final Pattern PATTERN_EMAIL = Pattern.compile("^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
+ "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$");
/**
* 邮箱验证
*
* @author ZengWenFeng
* @email 117791303@QQ.com
* @mobile 13805029595
* @date 2016.08.09
*/
public static boolean validateEmail(String email)
{
return PATTERN_EMAIL.matcher(email).matches();
}
Fraction.java-CSDN博客