Search for all files *not* containing a string in VS Code

In general regex, to search for anything that does not contain a certain string, you do stringbefore(?!string) That is a negative lookahead, it says that only match if whatever you specify as string is not present. In your case it would be something like [\W\w]+(?!OnPush)

But, Negative Lookaheads aren’t supported in VS Code Search… So you can’t do much.

Leave a Comment