Here you can find the source of isEMail(String str)
public static boolean isEMail(String str)
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static boolean isEMail(String str) { Pattern pattern = Pattern .compile("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); Matcher isEMail = pattern.matcher(str); if (!isEMail.matches()) { return false; }/*w w w .ja v a 2s . c o m*/ return true; } }