Skip to content

Instantly share code, notes, and snippets.

@elmundio87
Last active November 1, 2018 15:57
Show Gist options
  • Save elmundio87/b37c823b0d3606e58c4a3da66674ad42 to your computer and use it in GitHub Desktop.
Save elmundio87/b37c823b0d3606e58c4a3da66674ad42 to your computer and use it in GitHub Desktop.
Useful VSCode regexes

Obvs make sure you have the regex switch turned on in Find/Replace

Inverse Search

Search: ^(?!.*expression).*

Find and replace everything except something

Search: search(.*)anotherthing

Replace: $1

Remove all blank lines

Run this multiple times as needed

Search: \n\n

Replace: \n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment