Here you can find the source of isEmail(String strEmail)
public static boolean isEmail(String strEmail)
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static boolean isEmail(String strEmail) { String strPattern = "^[a-zA-Z][\\w\\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]\\.[a-zA-Z][a-zA-Z\\.]*[a-zA-Z]$"; Pattern p = Pattern.compile(strPattern); Matcher m = p.matcher(strEmail); return m.matches(); }//from w w w . j av a2s.c o m }