Here you can find the source of isEmail(String email)
public final static boolean isEmail(String email)
//package com.java2s; //License from project: Apache License import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public final static boolean isEmail(String email) { Pattern pattern = Pattern .compile("^\\w+([-.]\\w+)*@\\w+([-]\\w+)*\\.(\\w+([-]\\w+)*\\.)*[a-z]{2,3}$"); Matcher matcher = pattern.matcher(email); if (matcher.matches()) { return true; }//from w w w . jav a 2 s. com return false; } }