Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
5 lines (3 sloc) 226 Bytes

Invert Regular Expression Matches with JavaScript

Use/\S/gi; to match everything that isn't a space in the string.

You can invert any match by using the uppercase version of the selector \s versus \S for example.

Something went wrong with that request. Please try again.