Android Email String Validate isEmailFormat(String email)

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

Description

is Email Format

Declaration

public static boolean isEmailFormat(String email) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static boolean isEmailFormat(String email) {
        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;/*from   w  ww.  j ava 2  s . co m*/
        }
        return tag;
    }
}

Related

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