Android Email String Validate isEmail(String email)

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

Description

is Email

Declaration

public static boolean isEmail(String email) 

Method Source Code

//package com.java2s;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

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

Related

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