Here you can find the source of isEmail(CharSequence email)
public static boolean isEmail(CharSequence email)
//package com.java2s; //License from project: Apache License import java.util.regex.Pattern; public class Main { private final static Pattern emailer = Pattern.compile("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); public static boolean isEmail(CharSequence email) { if (isEmpty(email)) return false; return emailer.matcher(email).matches(); }/* w w w . j a v a2s . c o m*/ public static boolean isEmpty(CharSequence input) { if (input == null || "".equals(input)) return true; for (int i = 0; i < input.length(); i++) { char c = input.charAt(i); if (c != ' ' && c != '\t' && c != '\r' && c != '\n') { return false; } } return true; } public static boolean isEmpty(CharSequence... strs) { for (CharSequence str : strs) { if (isEmpty(str)) { return true; } } return false; } }