Java Email Validate isEmail(String email)

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

Description

is Email

License

Open Source License

Declaration

public static boolean isEmail(String email) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.regex.Pattern;

public class Main {
    static Pattern p = Pattern.compile(
            "^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$",
            Pattern.CASE_INSENSITIVE);

    public static boolean isEmail(String email) {

        return p.matcher(email).matches();
    }// w w w  .  j  a  v a 2 s .c  om
}

Related

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