Here you can find the source of isEmail(String email)
public static boolean isEmail(String email)
//package com.java2s; //License from project: Apache License import java.util.regex.Pattern; public class Main { public static boolean isEmail(String email) { if (isEmpty(email)) return false; return Pattern.matches("^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$", email); }/* w ww . j a v a2 s. c o m*/ public static boolean isEmpty(String str) { return str == null || (str.trim().length() == 0); } }