string remove between start string and end string
<p>I find this concept is the same as what I need:-</p>

<p><a href="http://stackoverflow.com/questions/16334442/remove-character-starting-with-x-and-ending-with-x-and-everything-between-it-in">Remove character starting with x and ending with x and everything between it in a string.</a></p>

<p>would there be similar function in php? also, is it possible to do replace all such cases in a long string?</p>

<p>example:
$text = "
<code>&lt;h2 class="active" tabindex="0" rel="120"&gt;Title 2&lt;/h2&gt;&lt;h2 class="active" tabindex="0" list="20" rel="120"&gt;Title 2&lt;/h2&gt;&lt;h2 class="active" tabindex="0" rel="120"&gt;Title 2&lt;/h2&gt;</code>";</p>

<p>Here, I wish to detect class="active", and the ">" of <code>&lt;/h2&gt;</code>, the remove any changing contents between.</p>
