title: RegEx to Filter some specific tags
body: <p>I'm developing an ASP code that read a external websites and parse it via HTMLDocument interface Object ( "HTMLFILE" Object) to navigate contents via DOM structure. But there are some pages that throw an error :</p>
  
  <blockquote>
    <p>'htmlfile error 80070057   Invalid Argument.'</p>
  </blockquote>
  
  <p>After doing a lot of research, I've discovered that there are some HTML tags that, i don't know why, are not rendered or managed correctly by HTMLFILE object giving me that error.</p>
  
  <p>Because ASP is too old and there isn't much content available today to be probing, I'm convinced that I have to parse it before send to HTMLFILE Object, and the best way that I have figured is to do via RegEx.</p>
  
  <p>But I'm facing some problems (and because i don't have much practice).</p>
  
  <p>I have to successfully locate HTML Tag Blocks that 'HTMLFILE' do not accept to be able to remove them.</p>
  
  <p>For Example:</p>
  
  <pre><code>&lt;head&gt;
  &lt;script&gt; .......  &lt;/script&gt;
  &lt;style&gt; ....... &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;iframe&gt; ........ &lt;/iframe&gt;
  &lt;div&gt; ..... &lt;/div&gt;
  &lt;table&gt;.....&lt;/table&gt;
  </code></pre>
  
  <p>I have to match full script block, style and iframe, leaving the rest of document intact.</p>
  
  <p>From last days i've doing some research and have almost done it:</p>
  
  <pre><code>&lt;(?:script|embed|object|frameset|frame|iframe|meta|style).+(.|\s)*?&gt;$
  </code></pre>
  
  <p>I've tried to match single line tag (for example '&lt;BR&gt;') but I'm totally confused now and there are some inconsistencies on it, for example, some of lines that close some tags are improperly selected.</p>
  
  <p>I Know that the best way is discover why HTMLFILE is throwing me on error, but there is no more information on error to debug it.</p>
  
  <p>Thank for all the time and patience.  </p>