Here you can find the source of validateEmailAddress(String address)
public static boolean validateEmailAddress(String address)
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { private static final String EMAIL_ADDRESS_REG_EXP = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"; public static boolean validateEmailAddress(String address) { Pattern pattern = Pattern.compile(EMAIL_ADDRESS_REG_EXP); Matcher matcher = pattern.matcher(address); if (matcher.matches()) { return true; }/*from ww w.j a va 2 s.c om*/ return false; } }