Skip to content

Challenge Invert Regular Expression Matches With JavaScript

Quincy Larson edited this page Aug 20, 2016 · 1 revision

Challenge 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.

Clone this wiki locally