Java Email Validate isEmail(String correo)

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

Description

is Email

License

Open Source License

Declaration

public static boolean isEmail(String correo) 

Method Source Code

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

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

public class Main {
    public static boolean isEmail(String correo) {

        Pattern pat = null;/*from  w  w  w.  ja va  2s .co m*/
        Matcher mat = null;

        pat = Pattern.compile("^[\\w\\\\\\+]+(\\.[\\w\\\\]+)*@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,4}$");
        mat = pat.matcher(correo);
        if (mat.find()) {
            return true;
        } else {
            return false;
        }
    }
}

Related

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