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.Pattern;

public class Main {
    private final static Pattern emailer = Pattern
            .compile("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");

    public static boolean isEmail(String email) {
        if (email == null || email.trim().length() == 0)
            return false;
        return emailer.matcher(email).matches();
    }/*from  w  ww .  j a  v  a  2s . co m*/
}

Related

  1. isEmail(String s)
  2. isEmailFormat(String email)
  3. isEmail(String s)
  4. isEmail(String str)