package gov.nih.nci.cagrid.portal.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * User: kherm
 *
 * @author kherm manav.kher@semanticbits.com
 */
public class EmailValidator {

    public static boolean validateEmail(String email) {
        //Set the email pattern string
        Pattern p = Pattern.compile(".+@.+\\.[a-z]+");

        //Match the given string with the pattern
        Matcher m = p.matcher(email);

        //check whether match is found
        return m.matches();
    }
}

@@ -1,8 +1,504 @@
+/**%0A*============================================================================%0A*  Copyright The Ohio State University Research Foundation, The University of Chicago - %0A*    Argonne National Laboratory, Emory University, SemanticBits LLC, and %0A*    Ekagra Software Technologies Ltd.%0A*%0A*  Distributed under the OSI-approved BSD 3-Clause License.%0A*  See http://ncip.github.com/cagrid-core/LICENSE.txt for details.%0A*============================================================================%0A**/%0A
 package 

Update EmailValidator.java