Swap attributes in tags using Visual Studio 2008 RegEx -


How to swap properties id and runat in all my tags Visual Studio 2008 solution?

  & asp: label id = "Label1" runat = "server" />  

became

  & asp: label runat = "server" id = "Label1" /> In the Find and Replace, enable the use of regular expressions.  

Replace with:

To tag sub-expressions in regular expressions, pre <> > Runat = "server" id = "\ 1"

use {}. Part means: Find one or more of the characters that are not quotation marks after "id =" and tag the next quotation marks and tag it as sub-expression.

By replacing, you first To denote sub expression, use 1 and tag ID.

Edit: Add a single space character in front of the search and replace the expression: ContentPlaceHolderID = "MainContent "Runat =" server ".


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -