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. j a v a2 s . com return Pattern.matches(EMAIL_REG_EXPRESSION, s); } }