Here you can find the source of isEmail(final String s)
public static boolean isEmail(final String s)
//package com.java2s; //License from project: Open Source License import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { private static Pattern email = Pattern.compile(".+[@].+[\\.].+"); public static boolean isEmail(final String s) { final Matcher m = email.matcher(s); return m.matches(); }//from w w w.j a v a2s.com }