I am trying to make a regular expression that validates letters, numbers and spaces ONLY. I dont want any special characters accepted (i.e. # )(*&^%$@!,)
I have been trying several things but nothing has given me letters(uppercase & lowercase), numbers, and spaces.
So it should accept something like this...
John Stevens 12
james stevens
willcall12
or
12cell space
but not this
12cell space!
John@Stevens
james 12 Fall#
I have tried the following
^[a-zA-Z0-9]+$
[\w _]+
^[\w_ ]+$
but they allow special characters or dont allow spaces. This is for a ruby validation.