Here you can find the source of isEmail(String s)
public static boolean isEmail(String s)
//package com.java2s; import java.util.regex.Pattern; public class Main { public static final String EMAIL_REG_EXPRESSION = "\\w+(\\.\\w+)*@\\w+(\\.\\w+)+"; public static boolean isEmail(String s) { if (s == null) { return true; }// ww w . ja v a2 s. c o m return Pattern.matches(EMAIL_REG_EXPRESSION, s); } }