Here you can find the source of isEmailValid(String emailAddress)
public static boolean isEmailValid(String emailAddress)
//package com.java2s; //License from project: Open Source License import java.util.regex.Pattern; import java.util.regex.Matcher; public class Main { public static boolean isEmailValid(String emailAddress) { try {/*from ww w . j av a2s .c o m*/ //InternetAddress.parse(emailAddress); Pattern alpha = Pattern.compile("[a-zA-Z0-9]@([\\w-]+\\.)+[\\w-]{2,4}$"); Matcher matcher = alpha.matcher(emailAddress.trim()); if (matcher.find()) return true; } catch (Exception ae) { return false; } return false; } }