Java Email Validate isEmail(String email)

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

Description

is Email

License

Apache License

Declaration

public static boolean isEmail(String email) 

Method Source Code

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

import java.util.regex.Pattern;

public class Main {

    public static boolean isEmail(String email) {
        if (isEmpty(email))
            return false;
        return Pattern.matches("^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$", email);
    }/*  w  ww  . j a v  a2 s. c o  m*/

    public static boolean isEmpty(String str) {
        return str == null || (str.trim().length() == 0);
    }
}

Related

  1. isEmail(final String text)
  2. isEmail(String correo)
  3. isEmail(String data)
  4. isEmail(String email)
  5. isEmail(String email)
  6. isEmail(String email)
  7. isEmail(String email)
  8. isEmail(String email)
  9. isEmail(String emailAddress)