Java Email Validate isValidEmailAddress(String email)

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

Description

is Valid Email Address

License

LGPL

Declaration

public static boolean isValidEmailAddress(String email) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

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

public class Main {
    public static boolean isValidEmailAddress(String email) {
        String regex = "^[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$";

        Pattern pattern = Pattern.compile(regex);

        Matcher matcher = pattern.matcher(email);

        return matcher.matches();
    }//from ww  w  . j a  va  2s .co m
}

Related

  1. isValidEmailAddress(String aEmailAddress)
  2. isValidEmailAddress(String email)
  3. isValidEmailAddress(String email)
  4. isValidEmailAddress(String email)
  5. isValidEmailAddress(String email)
  6. isValidEmailAddress(String emailAddress)
  7. isValidEmailAddress(String emailAddress)
  8. isValidEmailAddress(String emailAddress)
  9. isValidEmailAddress(String emailAddress)