Ekspresi reguler untuk tidak memberikan ruang dalam JavaScript

var regexp = /^\S*$/; // a string consisting only of non-whitespaces
Indian Gooner