title: JavaScript RegExp match text ignoring HTML
body: <p>Is it possible to match "the dog is really really fat" in "<code>The &lt;strong&gt;dog&lt;/strong&gt; is really &lt;em&gt;really&lt;/em&gt; fat!</code>" and add "<code>&lt;span class="highlight"&gt;WHAT WAS MATCHED&lt;/span&gt;</code>" around it?</p>
  
  <p>I don't mean this specifically, but generally be able to search text ignoring HTML, keeping it in the end result, and just add the span above around it all?</p>
  
  <p><strong>EDIT:</strong><br>
  Considering the HTML tag overlapping problem, would it be possible to match a phrase and just add the span around each of the matched words? The problem here is that I don't want the word "dog" matched when it's not in the searched context, in this case, "the dog is really really fat."</p>