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 regex = "^([\\w-\\.]+)@(("; return match(regex, str); }/*from ww w. j a v a2 s . c o m*/ private static boolean match(String regex, String str) { Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(str); return matcher.matches(); } }