.NET Framework Bookmark and Share   
 index > Regular Expressions > vs2008 regex control H tool.
 

vs2008 regex control H tool.

I want to remove all <%--
blah blah blah
--%>
code blocks from my .aspx .ascx pages using vs2008 regular expression tool. does anyone know how to do this?

thanks
Mattaniah
In VS2008, in your source file press CTRL-H. Make sure the Regular Expression checkbox is checked. In the find box, use the pattern...
\<%--(.|[\r\n])@--%\>
... Leave the Replace box blank. Then hit the find and replace or replace all buttons.
Les Potter, Xalnix Corporation, Yet Another C# Blog
  • Marked As Answer byMattaniah Thursday, August 27, 2009 11:41 AM
  •  
xalnix
In VS2008, in your source file press CTRL-H. Make sure the Regular Expression checkbox is checked. In the find box, use the pattern...
\<%--(.|[\r\n])@--%\>
... Leave the Replace box blank. Then hit the find and replace or replace all buttons.
Les Potter, Xalnix Corporation, Yet Another C# Blog
  • Marked As Answer byMattaniah Thursday, August 27, 2009 11:41 AM
  •  
xalnix
The boss told us to get rid of all commented out blocks of code

Thanks :)
Mattaniah

You can use google to search for other answers

Custom Search

More Threads

• How can I convert this c# code into a regular expression?
• regex searching for 10, not 1 or a 0
• Unexplained new line or break
• find string that do not belong to language
• want regex for a complicated string
• validating an Email ID?
• Regex question (lazy quantifier)
• Remove spaces in HTML Source
• How to regex everything before start of a specific string
• help required on complex search