Here you can find the source of isEmailAddressValid(String emailAddress)
public static boolean isEmailAddressValid(String emailAddress)
//package com.java2s; /*/*from w ww.ja v a 2 s .co m*/ * Copyright (c) UChicago Argonne, LLC. All rights reserved. * See LICENSE file. */ import java.util.regex.Pattern; public class Main { private static final Pattern emailPattern = Pattern.compile( "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$"); public static boolean isEmailAddressValid(String emailAddress) { return emailPattern.matcher(emailAddress).matches(); } }