title: RegEx to capture all text except certain tags
body: <p>Let's say I have a string such as:</p>
  
  <pre><code>Lorem ipsum dolor sit amet, &lt;foo attr="something"&gt;consectetur adipisicing elit&lt;/foo&gt;, sed do eiusmod &lt;bar&gt;tempor incididunt&lt;/bar&gt; ut labore et dolore &lt;baz&gt;magna aliqua&lt;/baz&gt;.
  </code></pre>
  
  <p>I'm looking to get all the text that's not part of a selected subset of tags.  In this example, <code>&lt;foo&gt;</code> and <code>&lt;bar&gt;</code> tags only.  I don't expect to be able to do this with one regular expression, I need some JS code which will let me manipulate the text outside of those specific tags, and then to re-constitute the entire string, modified.</p>
  
  <p>For example, let's say that I want to replace all letter a's with *.  The desired output would be:</p>
  
  <pre><code>Lorem ipsum dolor sit *met, &lt;foo attr="something"&gt;consectetur
  *dipisicing elit&lt;/foo&gt;, sed do eiusmod &lt;bar&gt;tempor incididunt&lt;/bar&gt; ut l*bore et dolore &lt;b*z&gt;magn* *liqu*&lt;/b*z&gt;.
  </code></pre>
  
  <p>Note how the <code>&lt;baz&gt;</code> tag has been modified.</p>