List of utility methods to do Email Validate
String | getSafeMailAddr(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; |
int | getSmtpPort(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)); ... |
boolean | isEmail(CharSequence email) is Email if (isEmpty(email)) return false; return emailer.matcher(email).matches(); |
boolean | isEmail(CharSequence input) is Email return email_Pattern.matcher(input).matches();
|
boolean | isEmail(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; |
boolean | isEmail(final String s) is Email final Matcher m = email.matcher(s); return m.matches(); |
boolean | isEmail(final String text) Validates that is an email Matcher matcher = Pattern.compile(EMAIL_PATTERN).matcher(text);
return matcher.matches();
|
boolean | isEmail(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; ... |
boolean | isEmail(String data) is Email return isMatchRegex(data, REGEX_IS_EMAIL);
|
boolean | isEmail(String email) is Email return p.matcher(email).matches();
|