Android examples for android.util:Patterns
Check if a string is a valid Email address by using android.util.Patterns.EMAIL_ADDRESS
public class Main{ public static boolean isEmail(String str) { if (str == null) return false; return android.util.Patterns.EMAIL_ADDRESS.matcher(str.trim()) .matches();/* w w w. ja va 2s .c o m*/ } }