Here you can find the source of isEmail(String str)
public static boolean isEmail(String str)
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static boolean isEmail(String str) { String pattern1 = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; Pattern pattern = Pattern.compile(pattern1); Matcher mat = pattern.matcher(str); return !mat.find(); }//from ww w .j a v a 2s . c om }