Here you can find the source of isEmail(String email)
public static boolean isEmail(String email)
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static boolean isEmail(String email) { String format = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; Pattern pattern = Pattern.compile(format); Matcher matcher = pattern.matcher(email); return matcher.find(); }/*from ww w .ja v a 2s. c om*/ }