Payday Loan Payday Loan

The following regex expression will help you to determine if there is a valid e-mail address or not in your edit text.

public static boolean isValid(String email) {
 
    String expression = "^[\\w\\.-]+@([\\w\\-]+\\.)+[A-Z]{2,4}$";
    CharSequence inputStr = email;
    Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);
    Matcher matcher = pattern.matcher(inputStr);
    if (matcher.matches()) {
        return true;
    }
    else{
    return false;
    }
}
||||| 0 I Like It! |||||

Search

Popular

Sponsors