title: Regex to remove empty html tags, that contains only empty children
body: <p>I need to parse an HTML string and remove all the elements which contain only empty children.</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;P ALIGN="left"&gt;&lt;FONT FACE="Arial" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="1"&gt;&lt;B&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/P&gt;
  </code></pre>
  
  <p>contains no information and must be replaced with <code>&lt;/br&gt;</code></p>
  
  <p>I wrote a regex like this:</p>
  
  <pre><code>&lt;\w+\b[^&gt;]*&gt;(&lt;\w+\b[^&gt;]*&gt;\s*&lt;/\w*\s*&gt;)*&lt;/\w*\s*&gt;
  </code></pre>
  
  <p>but the problem is that it's catching only 2 levels of the three. In the abobe example, the <code>&lt;p&gt;</code> element (the outer-most one) is not selected.</p>
  
  <p>Can you help me fix this regex?</p>