Here you can find the source of isEmail(String text)
public static boolean isEmail(String text)
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { private static final Pattern EMAIL_REG = Pattern.compile("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); public static boolean isEmail(String text) { Matcher matcher = EMAIL_REG.matcher(text); if (matcher.find()) { return true; }/*from w w w . j av a 2 s. co m*/ return false; } }