Android Email String Validate isEmail(String str)

Here you can find the source of isEmail(String str)

Description

is Email

Declaration

public static boolean isEmail(String str) 

Method Source Code

//package com.java2s;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    public static boolean isEmail(String str) {
        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();
    }//from ww  w .j a v a  2s  .  c om
}

Related

  1. isEmail(String email)
  2. isEmail(String s)
  3. isEmailFormat(String email)
  4. isEmail(String s)
  5. isValidEmail(String inputStr)
  6. isEMail(String str)
  7. checkEmail(String email)
  8. isEmail(String email)