Strip specific spans tags using PHP
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1392346/php-strip-tags-for-div-with-a-specific-id">PHP Strip_tags for div with a specific ID?</a>  </p>
</blockquote>



<p>I have a string that contains two types of span tags. One type has an id that starts with the keyword "junk_". The other type, however has some random ids. What I want to do is to use preg_replace to strip out only the "junk_" span tags and their content. I still want to keep the other spans. Here is the string that I have</p>

<pre><code>&lt;span id="bla"&gt;This is a test&lt;/span&gt;. 
&lt;span id="junk_74"&gt;Please&lt;/span&gt; remove &lt;span id="junk_75"&gt;all&lt;/span&gt; junk spans.
</code></pre>

<p>The output I want should look like:</p>

<pre><code>&lt;span id="bla"&gt;This is a test&lt;/span&gt;. remove junk spans.
</code></pre>

<p>Any help would be greatly appreciated. </p>
