I’m trying to use Visual Studio’s search-replace function to remove tags that don’t do anything. The intent is to simplify some HTML before I paste it into a SharePoint page.
This is what I’m using in the Find box \<font\>{~(.*\<font\>.*)}\</font\>
And the Replace box has \1
However, the expression comes up with no matches, even though I have plenty of places like this <font> xxxx </font> within the HTML. I could move the .* outside the paranthesis, but then the expression matches most of the line where I have multiple sets of font tags – some which actually do something.
I’m thinking this would be much easier if the IDE used the same regular expression engine as the languages for which it is the primary development tool.
I just had to review the documentation for VS 2010. Using a minimal match
@was all I needed:\<font\>{.@}\</font\>.