title: php use preg_replace remove div
body: <p>I tried use <code>preg_replace</code> remove the div which <code>class="image content"</code>, I use some code below, but still remain two <code>&lt;/div&gt;</code> after my <code>preg_replace</code>, need a help, thanks.</p>
  
  <pre><code>&lt;style&gt;
  #contract{width:100%;height:100%;}
  #content{width:1002px;overflow:hidden;margin:0 auto;}
  &lt;/style&gt;
  &lt;div id="contract"&gt;
  &lt;div id="content"&gt;
  &lt;?php
  $html = &lt;&lt;&lt;EOT
  &lt;div style="float:left;" class="image content"&gt;&lt;div style="float:left;"&gt;&lt;div style="float:left;"&gt;
      &lt;img alt="Se hai problemi nella visualizzazione dei caratteri, clicca qui." src="../../image/1001.jpg" &gt;
  &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;div class="content" style="float:left;"&gt;&lt;i&gt;some content here.&lt;/i&gt;&lt;/div&gt;
  EOT;
  echo preg_replace('/&lt;div(.*?)class="image content"&gt;([\s\S]*?)&lt;\/div&gt;/','',$html);
  ?&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I need return: <code>&lt;div class="content" style="float:left;"&gt;&lt;i&gt;some content here.&lt;/i&gt;&lt;/div&gt;</code></p>