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) {
        Pattern pattern = Pattern.compile(
                "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+",
                Pattern.CASE_INSENSITIVE);
        Matcher matcher = pattern.matcher(str);
        if (matcher.matches()) {
            return true;
        } else {/*w  w w . j  a v a 2 s.  c  om*/
            return false;
        }
    }
}

Related

  1. isEmail(String strEmail)
  2. isEmail(String string)
  3. isEmail(String strEmail)
  4. getNameFromEmail(String email)
  5. isLegalEmail(String email)
  6. isEmail(String email)
  7. isEmail(String text)
  8. isEmailFormat(String email)
  9. isValidEmail(CharSequence target)