Click here to Skip to main content
14,976,321 members
Articles / General Programming / Regular Expressions
Tip/Trick
Posted 23 Nov 2009

Stats

25K views
7 bookmarked

Regex to remove someone's overzealous use of regions.

Rate me:
Please Sign up or sign in to vote.
5.00/5 (12 votes)
23 Nov 2009CPOL
A Visual Studio regex to remove someone's overzealous use of regions in VS. Find and replace: (^.*\#region.*$)|(^.*\#endregion.*$) Remember to enable regular expressions in the Visual Studio find and replace dialog.

A Visual Studio regex to remove someone's overzealous use of regions in VS.

Find and replace: (^.*\#region.*$)|(^.*\#endregion.*$)

 Remember to enable regular expressions in the Visual Studio find and replace dialog.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Daniel Vaughan
Engineer Microsoft
United States United States
Daniel Vaughan is a Senior Software Engineer at Microsoft.

Previously Daniel was a nine-time Microsoft MVP and co-founder of Outcoder, a Swiss software and consulting company.

Daniel is the author of Windows Phone 8 Unleashed and Windows Phone 7.5 Unleashed, both published by SAMS.

Daniel is the developer behind several acclaimed mobile apps including Surfy Browser for Android and Windows Phone. Daniel is the creator of a number of popular open-source projects, most notably Codon.

Would you like Daniel to bring value to your organisation? Please contact

Blog | Twitter


Xamarin Experts
Windows 10 Experts

Comments and Discussions

 
GeneralMy vote of 5 Pin
Farhad Reza17-Nov-16 5:30
MemberFarhad Reza17-Nov-16 5:30 
QuestionNice, some people really go overboard with regions Pin
Friedrich Brunzema10-Jun-14 10:20
MemberFriedrich Brunzema10-Jun-14 10:20 
GeneralReason for my vote of 5 Good one Daniel Pin
thatraja7-Mar-11 6:35
professionalthatraja7-Mar-11 6:35 
GeneralRe: Thanks Thatraja! Pin
Daniel Vaughan7-Mar-11 7:29
MemberDaniel Vaughan7-Mar-11 7:29 
GeneralReason for my vote of 5 #region is maybe the worst thing in ... Pin
Remi BOURGAREL26-Oct-10 11:48
MemberRemi BOURGAREL26-Oct-10 11:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.