title: How to find a matching closing tag in html string?
body: <p>Imagine the following HTML:</p>
  
  <pre><code>&lt;div&gt;
    &lt;b&gt;&lt;/b&gt;
    &lt;div&gt;
      &lt;table&gt;...&lt;/table&gt;
    &lt;/div&gt;
  &lt;/div&gt; &lt;!-- this one --&gt;
  ...
  </code></pre>
  
  <p>How could I find the matching closing tag for the first opening div tag? Is there a reg ex that could find it? I guess this is quite a common requirement but I'm struggling to find anything straightforward, just full blown HTML parsers.</p>