title: How to Find replace in HTML using VBS
body: <p>I've got many HTML files in a folder, for each file I want to replace n-dash and m-dash with linefeed or paragrah mark, but only for specific html class.</p>
  
  <p>For example, I would like to find/replace only text in class "Center".
  Original: </p>
  
  <pre><code> class=Center &lt;p class="Center"&gt;&amp;laquo; Sentence1 &amp;mdash; Sentence2 &amp;ndash; Sentence3&lt;/p&gt;
   class=Aligned &lt;p class="Aligned"&gt;&amp;laquo;Other Sentence4 &amp;mdash; Other Sentence5 &amp;ndash; OtherSentence6&amp;laquo;&lt;/p&gt;
  </code></pre>
  
  <p>Desired result:  </p>
  
  <pre><code>&lt;p class="Center"&gt;&amp;laquo; Sentence1 &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt; Sentence2 &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt; Sentence3&amp;laquo;&lt;/p&gt;
  &lt;p class="Aligned"&gt;&amp;laquo;Other Sentence4 &amp;mdash; Other Sentence5 &amp;ndash; OtherSentence6&amp;laquo;&lt;/p&gt;
  </code></pre>
  
  <p>So far I'm using this solution by Helen: <a href="https://stackoverflow.com/a/1758239/5471234">https://stackoverflow.com/a/1758239/5471234</a></p>
  
  <p>But implementing this <code>"strText = Replace(strText, "&amp;ndash;", "&lt; /p&gt;&lt; p&gt;&lt; /p&gt;&lt; p&gt;")"</code> performs F/R in the whole text.</p>
  
  <p>How can I limit it to <code>class=Center</code>? Any way to use RegEx? and/or html object .innerText to grab only specific class?</p>