0

I want to select all catch blocks (in my C# code in visual studio) using regular express search but unable to create a regular expression that selects all catch blocks (including empty blocks and blocks with different exception handling)

I have tried following regular expressions but failed

.*catch.*(\r?\n)*.*(})
.*catch.*(\r?\n)*\s*.*(\r?\n)*.*(\r?\n)*
Stefan Wuebbe
  • 2,109
  • 5
  • 17
  • 28
Abdullah
  • 11
  • 1

1 Answers1

1

I have found the solution, regular expression catch(.|\n)*?} will select all catch blocks

Abdullah
  • 11
  • 1