Skip to content

Instantly share code, notes, and snippets.

@brianschmitt
Last active December 11, 2019 21:18
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save brianschmitt/755dd09e33018a2b1dc6 to your computer and use it in GitHub Desktop.
Save brianschmitt/755dd09e33018a2b1dc6 to your computer and use it in GitHub Desktop.
Find Empty Catch Blocks - Visual Studio Regex
//Find Dialog - Use Regular Expressions - works for both C# and VB
catch.*[\r?\n\s]*((End Try)|({\s*\r?\n*}))
//For older versions of Visual Studio:
catch.*\n+:b+((End Try)|(\{[:b\n]+\}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment