Here's a simple regular expression function that will strip non-numeric characters from a string. Useful for cleaning phone numbers.
// strips non-numeric values from a string
def stripNonNumeric(String stringIn) {
def returnString = stringIn.replaceAll(/[^0-9]/, "")
return returnString
}