match one or more contiguous white space characters
match one or more contiguous white space characters in a string.
can be used in JS, for example, to replace any white space characters (tab, space, newline), as well as multiple contiguous WS chars, with a single space character.
var text = “1 2 \t \n 3”;
text = text.replace(/\s+/g, ' '...
Submitted by anonymous - 2 years ago