Java Email Validate checkEmail(String mail)

Here you can find the source of checkEmail(String mail)

Description

check Email

License

Open Source License

Declaration

public static boolean checkEmail(String mail) 

Method Source Code

//package com.java2s;

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

public class Main {

    public static boolean checkEmail(String mail) {
        String regex = "\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
        Pattern p = Pattern.compile(regex);
        Matcher m = p.matcher(mail);
        return m.find();
    }/* w  w w .j a  va2  s . c o  m*/
}

Related

  1. baseAddress(String email)
  2. checkEmail(String email)
  3. checkEmail(String email)
  4. checkEmail(String email)
  5. checkEmail(String email)
  6. checkEmailAddress(String address)
  7. checkEmailAddressNoEx(String inEmailAddress)
  8. checkEmailPattern(String email)
  9. checkEmailWithSuffix(String email)