I need help with regular expression. I need a expression which allows only alphabets with space for ex. college name.
I am using :
var regex = /^[a-zA-Z][a-zA-Z\s]+$/;
but it's not working.
Just add the space to the [ ] :
var regex = /^[a-zA-Z ]*$/;
2.1m questions
2.1m answers
60 comments
57.0k users