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) { Pattern pattern = Pattern.compile( "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+", Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(str); if (matcher.matches()) { return true; } else {/*w w w . j a v a 2 s. c om*/ return false; } } }