RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find HTML Tag and InnerHTML Remover
Expression
<(tag1|tag2)[^>]*\/?>.*<\/(?:\1)>
Description
Removes all the text between two tags. Replace the "tag1" and "tag2" with the tag you want to remove, you can add more by placing additional "|" between each tag.
Matches
&lt;tag1&gt;Welcome!&lt;/tag1&gt; | &lt;tag1&gt;How &lt;b&gt;are&lt;/b&gt; you?&lt;/tag1&gt;
Non-Matches
&lt;tag1&gt;How &lt;b&gt;are&lt;/b&gt; you? | &lt;tag1&gt;How &lt;b&gt;are&lt;/b&gt; you?&lt;/tag2&gt;
Author Rating: Not yet rated. Kerry Jones
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials