regex don't allow space code example
Example: regular expression not to allow space in javascript
var regexp = /^\S*$/; // a string consisting only of non-whitespaces
var regexp = /^\S*$/; // a string consisting only of non-whitespaces