Java tutorial
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static final boolean isValidEmail(final String email) { boolean result = false; if (email != null) { // \\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)* Pattern pattern = Pattern.compile("\\w+(\\.\\w+)*@\\w+(\\.\\w+)+"); Matcher matcher = pattern.matcher(email.trim()); result = matcher.matches(); } return result; } }