I am searching for a regular expression for allowing alphanumeric characters, -, _ or spaces in JavaScript/jQuery. I tried Googling but wasn't able to find that.
Can anyone help me out with this?
Thanks in advance.
Try this regex:
/^[a-zd-_s]+$/i
1.4m articles
1.4m replys
5 comments
57.0k users