Reputation: 11
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)*
Upvotes: 0
Views: 74
Reputation: 11
I have found the solution, regular expression catch(.|\n)*?} will select all catch blocks
Upvotes: 1