Here you can find the source of isEmail(String input)
public static boolean isEmail(String input)
//package com.java2s; //License from project: Apache License import java.util.regex.*; public class Main { public static boolean isEmail(String input) { return tstPattern("^[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)+$", input); }/*from w ww .jav a 2s.co m*/ public static boolean tstPattern(String regex, String input) { Pattern p = Pattern.compile(regex); return p.matcher(input).matches(); } }