Here you can find the source of isEmailValid(String email)
public static boolean isEmailValid(String email)
//package com.java2s; /******************************************************************************* * Copyright (c) 2004, 2007 Boeing./*from ww w . jav a2 s . c o m*/ * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Boeing - initial API and implementation *******************************************************************************/ import java.util.regex.Pattern; public class Main { private static Pattern addressPattern = Pattern.compile(".+?@.+?\\.[a-z]+"); public static boolean isEmailValid(String email) { return addressPattern.matcher(email).matches(); } }