title: How to remove entire div with preg_replace
body: <p>Ok, as it is WordPress problem and it sadly goes a little deeper, I need to remove each representation of parent div and its inside:</p>
  
  <pre><code>&lt;div class="sometestclass"&gt;
     &lt;img ....&gt;
     &lt;div&gt;.....&lt;/div&gt;
     any other html tags
  &lt;/div&gt;&lt;!-- END: .sometestclass --&gt;
  </code></pre>
  
  <p>The only idea I have is to match everything that starts with:</p>
  
  <pre><code>&lt;div class="sometestclass"&gt;
  </code></pre>
  
  <p>and ends with:</p>
  
  <pre><code>&lt;!-- END: .sometestclass --&gt;
  </code></pre>
  
  <p>with all that is between (I can tag the end of parent div anyway I want, this is just a sample).
  Anybody have an idea how to do it with:</p>
  
  <pre><code>&lt;?php $content = preg_replace('?????','',$content); ?&gt;
  </code></pre>