Skip to content

Instantly share code, notes, and snippets.

@tomgullo
Created September 11, 2009 12:05
Show Gist options
  • Save tomgullo/185254 to your computer and use it in GitHub Desktop.
Save tomgullo/185254 to your computer and use it in GitHub Desktop.
groovy regexp
static String anInvalidCharacter = /[^-A-Za-z9-9@\s()\,\;\:\.]+/
if (s =~ anInvalidCharacter)
//an invalid character
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment