From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript RegExp Object
The \S metacharacter is used to find a non-whitespace character.
A whitespace character can be:
| new RegExp("\S") or simply: /\S/ |
ExampleDo a global search for non-whitespace characters in a string:
The marked text below shows where the expression gets a match (matches everything except the whitespaces):
Try it yourself » |
JavaScript RegExp Object
From http://www.w3schools.com (Copyright Refsnes Data)