Java Email Validate isEmail(String email)

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

Description

is Email

License

Mozilla Public License

Declaration

public static boolean isEmail(String email) 

Method Source Code


//package com.java2s;
/*// w w  w  . j av  a2  s.  c om
* ??????? (C) 2000-2007 ????? <TanMenglong@gmail.com>
* 
* ????????Mozilla Public Licene1.1?????????????????????????????
* http://www.mozilla.org/MPL/MPL-1.1.html
*/

import java.util.regex.*;

public class Main {
    private static String EMAIL_REGEX = "";

    public static boolean isEmail(String email) {
        return isMatch(email, EMAIL_REGEX);
    }

    public static boolean isMatch(String str, String regEx) {
        Pattern pattern = Pattern.compile(regEx);
        Matcher matcher = pattern.matcher(str);
        return matcher.matches();
    }
}

Related

  1. isEmail(String data)
  2. isEmail(String email)
  3. isEmail(String email)
  4. isEmail(String email)
  5. isEmail(String email)
  6. isEmail(String email)
  7. isEmail(String emailAddress)
  8. isEmail(String input)
  9. isEmail(String msg)