numbers not allowed (0-9) - Regex Expression in javascript
Like this: ^[^0-9]+$
Explanation:
^
matches the beginning of the string[^...]
matches anything that isn't inside0-9
means any character between 0 and 9+
matches one or more of the previous thing$
matches the end of the string
Simply:
/^([^0-9]*)$/
That pattern matches any number of characters that is not 0
through 9
.
I recommend checking out http://regexpal.com/. It will let you easily test out a regex.