I thought to myself, as I swam through an ASP.NET Razor View crammed with Javascript functions, 'SURELY someone has made a VS plugin that does function code folding?'.
Yup, Microsoft has. http://visualstudiogallery.msdn.microsoft.com/872d27ee-38c7-4a97-98dc-0d8a431cc2ed
DaddyCode Team Blog
C# , ASP.NET, MVC, SQL, Sharepoint, JQuery and nowt else from a Web Developer in Leeds
14 Dec 2011
9 Dec 2011
Visual Studio RegEx Regular Expression Cheat Sheet
Why MS decided to use a non-standard RegEx parser for Visual Studio 2010's Find/Replace controls, I don't know. All I do know is that I forget the syntax EVERY FRIGGING TIME in the heat of battle. So, here's the skinny:
Match group definition using CURLY BRACE {}
Match group replacement using BACKSLASH \
So to turn <bob.holness> to *bob* use:
FIND: \<{:a#}\>
REPLACE: *\1*
NOTE:
The :a is the VS alpha-numeric character match pattern
The # is the VS 'non-greedy' 1-or-more match pattern
BREAKING NEWS: Microsoft have come to their senses with VS2012 and use the standard .NET RegEx parser in the Find/Replace box now. Phew.
Match group definition using CURLY BRACE {}
Match group replacement using BACKSLASH \
So to turn <bob.holness> to *bob* use:
FIND: \<{:a#}\>
REPLACE: *\1*
NOTE:
The :a is the VS alpha-numeric character match pattern
The # is the VS 'non-greedy' 1-or-more match pattern
BREAKING NEWS: Microsoft have come to their senses with VS2012 and use the standard .NET RegEx parser in the Find/Replace box now. Phew.
Subscribe to:
Posts (Atom)
If I helped you out today, you can buy me a beer below. Cheers!