Here you can find the source of isValidEmailAddress(String email)
Parameter | Description |
---|---|
a parameter |
public static boolean isValidEmailAddress(String email)
//package com.java2s; //License from project: Apache License import java.util.regex.Pattern; public class Main { public static Pattern EMAIL_REGEX_PATTERN = Pattern.compile("\\b[\\w.%-]+@[-.\\w]+\\.[A-Za-z]{2,4}\\b", Pattern.CASE_INSENSITIVE); /**/*from w w w .j a v a 2s.com*/ * Check if given email is a valid email * @param email * @return */ public static boolean isValidEmailAddress(String email) { return EMAIL_REGEX_PATTERN.matcher(email).matches(); } }