Java tutorial
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { private static final String EMAIL_REGEX = "^[\\w\\-.$/|?:;\\[\\]~&^`#{} *+=%<>'!,\"]+@[\\w.-]+[.][a-zA-Z0-9]+$"; public static boolean validateEmailAddress(String email) { Pattern pattern = Pattern.compile(EMAIL_REGEX, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(email); return matcher.matches(); } }