List of utility methods to do Email String Validate
boolean | isEmail(String email) is Email if (email == null || email.trim().length() == 0) return false; return emailer.matcher(email).matches(); |
boolean | isEmail(String s) is Email if (s == null) { return true; return Pattern.matches(EMAIL_REG_EXPRESSION, s); |
boolean | isEmailFormat(String email) is Email Format boolean tag = true; final String pattern1 = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; final Pattern pattern = Pattern.compile(pattern1); final Matcher mat = pattern.matcher(email); if (!mat.find()) { tag = false; return tag; ... |
boolean | isEmail(String s) is Email if (s == null) { return true; return Pattern.matches(EMAIL_REG_EXPRESSION, s); |
boolean | isEmail(String str) is Email String pattern1 = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; Pattern pattern = Pattern.compile(pattern1); Matcher mat = pattern.matcher(str); return !mat.find(); |
boolean | isValidEmail(String inputStr) is Valid Email boolean rtn = false; if (inputStr == null) { return rtn; String regex = "^[_a-z0-9-]+(.[_a-z0-9-]+)*@(?:\\w+\\.)+\\w+$"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(inputStr); if (m.matches()) { ... |
boolean | isEMail(String str) is E Mail Pattern pattern = Pattern .compile("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); Matcher isEMail = pattern.matcher(str); if (!isEMail.matches()) { return false; return true; |
boolean | checkEmail(String email) check Email Pattern pattern = Pattern .compile("^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"); Matcher matcher = pattern.matcher(email); return matcher.matches(); |
boolean | isEmail(String email) is Email String str = "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"; Pattern p = Pattern.compile(str); Matcher m = p.matcher(email); return m.matches(); |
boolean | isEmail(String email) is Email String format = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; Pattern pattern = Pattern.compile(format); Matcher matcher = pattern.matcher(email); return matcher.find(); |