reg for allow whitespace in textbox using javascript 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