regular expression for alphanumeric and space in javascript code example Example: regular expression alphanumeric with spaces java script /^[a-z\d\-_\s]+$/i