We have recently replaced a bunch of code in our solution leaving us with a lot of empty else statements. I’d like to do a find and replace all using a regex string and was wondering if anyone could produce a Regex to use in VS2010’s find and replace to find all patterns matching the code below:
else
{}
I’ve tried to modify some of the patterns i’ve found in other questions relating to empty catch blocks on stackoverflow to no avail.
Thanks!
this says look for else, followed by any white space or line breaks, then { followed by any white space or line breaks then }
Matches any of the following: