Java Email Validate isEmail(String str)

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

Description

is Email

License

Open Source License

Declaration

public static boolean isEmail(String str) 

Method Source Code

//package com.java2s;

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

public class Main {

    public static boolean isEmail(String str) {

        String regex = "^([\\w-\\.]+)@((";
        return match(regex, str);
    }/*from   ww w.  j  a v  a2 s . c o m*/

    private static boolean match(String regex, String str) {

        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(str);
        return matcher.matches();
    }
}

Related

  1. isEmail(String input)
  2. isEmail(String msg)
  3. isEmail(String s)
  4. isEmail(String str)
  5. isEmail(String str)
  6. isEmail(String str)
  7. isEmail(String str)
  8. isEmail(String str)
  9. isEmail(String str, boolean nullCheck)