title: Remove corrupt/broken HTML Tags with PHP
body: <p>Lets say I've a code where i've lots of <code>&lt;/pre&gt;</code> "unopened" and with no relevant values inside.
  Let's say i've got a major <code>&lt;pre&gt;</code> well started and ended with valuable content inside.
  How can I clean up my code by removing unused <code>&lt;/pre&gt;</code> and the extra content outside the main <code>&lt;pre&gt;</code> using PHP (please don't say DOM)?</p>
  
  <p>Thanks for reading.</p>
  
  <p>Edited with an E.g.</p>
  
  <pre><code>&lt;body&gt;
  &lt;pre&gt;good PRE&lt;/pre&gt;
  BLA BLA BLA &lt;/pre&gt;
  BLA BLA BLA &lt;/pre&gt;
  BLA BLA BLA &lt;/pre&gt;
  BLA BLA BLA &lt;/pre&gt;
  &lt;/body&gt;
  </code></pre>