akan
03-11-2010, 12:06 AM
Hi, I'm trying to match valid names from a list. Valid names can only contain letters, periods ".", commas "," , spaces " ", and must atleast contain 1 letter.
var checkname = /[a-zA-Z]+(\.|,|\s)*/;
but with this regex string, it also matches names that contain letters and numbers. How do I make it to match only what I've mentioned above?
Any help would be appreciated...
Thanks
var checkname = /[a-zA-Z]+(\.|,|\s)*/;
but with this regex string, it also matches names that contain letters and numbers. How do I make it to match only what I've mentioned above?
Any help would be appreciated...
Thanks