Java Email Validate validateEmail(String email)

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

Description

validate Email

License

Open Source License

Declaration

public static boolean validateEmail(String email) 

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 validateEmail(String email) {

        Pattern p = Pattern.compile(".+@.+\\.[a-z]+");

        Matcher m = p.matcher(email);

        boolean matchFound = m.matches();

        if (matchFound) {
            return true;
        } else {/*from   w  w  w .ja  v a  2  s.co m*/
            return false;
        }
    }
}

Related

  1. validateEmail(String email)
  2. validateEmail(String email)
  3. validateEmail(String email)
  4. validateEmail(String email)
  5. validateEmail(String email)
  6. validateEmail(String hex)
  7. validateEmail2(String field)
  8. validateEmailAddress(String address)
  9. validEmail(String canidate)