Java Utililty Methods Email Validate

List of utility methods to do Email Validate

Description

The list of methods to do Email Validate are organized into topic(s).

Method

StringgetSafeMailAddr(String mailAddr)
get Safe Mail Addr
Pattern reg = Pattern.compile("[\\w_]+@[\\w_]+\\.[A-Za-z]{2,4}");
Matcher exec = reg.matcher(mailAddr);
if (exec.find()) {
    return exec.group(0);
return mailAddr;
intgetSmtpPort(String email)
get Smtp Port
Pattern pattern = Pattern.compile("\\w+@(\\w+)(\\.\\w+){1,2}");
Matcher matcher = pattern.matcher(email);
String key = "unSupportEmail";
if (matcher.find()) {
    key = "smtp.port." + matcher.group(1);
if (hostMap.containsKey(key)) {
    return Integer.parseInt(hostMap.get(key));
...
booleanisEmail(CharSequence email)
is Email
if (isEmpty(email))
    return false;
return emailer.matcher(email).matches();
booleanisEmail(CharSequence input)
is Email
return email_Pattern.matcher(input).matches();
booleanisEmail(final String email)
Is given email format correct?
boolean isMatched = false;
String check = "^([a-z0-9A-Z]+[-|//.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?//.)+[a-zA-Z]{2,}$";
isMatched = isMatched(email, check);
return isMatched;
booleanisEmail(final String s)
is Email
final Matcher m = email.matcher(s);
return m.matches();
booleanisEmail(final String text)
Validates that is an email
Matcher matcher = Pattern.compile(EMAIL_PATTERN).matcher(text);
return matcher.matches();
booleanisEmail(String correo)
is Email
Pattern pat = null;
Matcher mat = null;
pat = Pattern.compile("^[\\w\\\\\\+]+(\\.[\\w\\\\]+)*@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,4}$");
mat = pat.matcher(correo);
if (mat.find()) {
    return true;
} else {
    return false;
...
booleanisEmail(String data)
is Email
return isMatchRegex(data, REGEX_IS_EMAIL);
booleanisEmail(String email)
is Email
return p.matcher(email).matches();