title: removing all divs with a certain class
body: <p>I have an HTML string, and I want to remove from it all DIVs whose class is "toremove".</p>
  
  <p>This is trivial to do on the client side with jQuery etc., but I want to do it on the server side with PHP.</p>
  
  <p>A simple aegular expression won't work, because divs may be nested...</p>