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; import android.text.TextUtils; public class Main { public static final String regEmail = "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"; public static boolean isEmail(String text) { if (TextUtils.isEmpty(text)) { return false; }/*from w w w. j a v a 2 s .c o m*/ Pattern pattern = Pattern.compile(regEmail); Matcher matcher = pattern.matcher(text); return matcher.find(); } public static boolean isEmpty(String text) { if (text == null || text.length() == 0) { return true; } return false; } }