title: Strip tag with class in PHP
body: <p>So I need to strip the <code>span</code> tags of class <code>tip</code>.
  So that would be <code>&lt;span class="tip"&gt;</code> and the corresponding <code>&lt;/span&gt;</code>, and everything inside it...  </p>
  
  <p>I suspect a regular expression is needed but I terribly suck at this.</p>
  
  <hr>
  
  <p>Laugh...</p>
  
  <pre><code>&lt;?php
  $string = 'April 15, 2003';
  $pattern = '/(\w+) (\d+), (\d+)/i';
  $replacement = '${1}1,$3';
  echo preg_replace($pattern, $replacement, $string);
  ?&gt;
  </code></pre>
  
  <p>Gives no error... But</p>
  
  <pre><code>&lt;?php
  $str = preg_replace('&lt;span class="tip"&gt;.+&lt;/span&gt;', "", '&lt;span class="rss-title"&gt;&lt;/span&gt;&lt;span class="rss-link"&gt;linkylink&lt;/span&gt;&lt;span class="rss-id"&gt;&lt;/span&gt;&lt;span class="rss-content"&gt;&lt;/span&gt;&lt;span class=\"rss-newpost\"&gt;&lt;/span&gt;');
  echo $str;
  ?&gt;
  </code></pre>
  
  <p>Gives me the error:  </p>
  
  <pre><code>Warning: preg_replace() [function.preg-replace]: Unknown modifier '.' in &lt;A FILE&gt; on line 4
  </code></pre>
  
  <p>previously, the error was at the <code>);</code> in the 2nd line, but now.... >.></p>