Android Email String Validate isEmail(String email)

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

Description

is Email

License

Apache License

Declaration

public final static boolean isEmail(String email) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

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

public class Main {
    public final static boolean isEmail(String email) {
        Pattern pattern = Pattern
                .compile("^\\w+([-.]\\w+)*@\\w+([-]\\w+)*\\.(\\w+([-]\\w+)*\\.)*[a-z]{2,3}$");
        Matcher matcher = pattern.matcher(email);
        if (matcher.matches()) {
            return true;
        }//from w w  w  .  jav  a 2 s.  com
        return false;
    }
}

Related

  1. isEmail(String text)
  2. isEmailFormat(String email)
  3. isValidEmail(CharSequence target)
  4. isValidEmailAddress(String email)
  5. isEmailValid(CharSequence email)
  6. isEmail(String str)
  7. isEmailValid(String email)
  8. checkMail(String email)
  9. isEmail(String s)