Groovy Function Tests If a String is a Valid Email Address

Here's a simple regular expression function that will return a Boolean indicating if the specified string is an Email Address.

// is the string an email addressdef isEmail(String emailAddress) {    def emailRegEx = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2}$/    def isEmail = !emailAddress.matches(emailRegEx)    return isEmail}