Java Email Validate isEmail(String text)

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

Description

is Email

License

Open Source License

Declaration

public static boolean isEmail(String text) 

Method Source Code

//package com.java2s;

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

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

    public static boolean isEmail(String text) {
        Matcher matcher = EMAIL_REG.matcher(text);
        if (matcher.find()) {
            return true;
        }/*from w w  w  .  j  av a  2 s.  co m*/
        return false;
    }
}

Related

  1. isEmail(String str)
  2. isEmail(String str)
  3. isEmail(String str, boolean nullCheck)
  4. isEmail(String string)
  5. isEmail(String string)
  6. isEmail(String val)
  7. isEmail(String value)
  8. isEmail(String value)
  9. isEmailAddress(String input)