title: How to exclude a word with JavaScript using regular expressions?
body: <p>I am new using regular expression and I was wondering if it is possible to exclude a word. I have the following list of data:</p>
  
  <pre><code>cat.text"
  cat.doc"
  dog.txt"
  dog.text"
  frog.txt"
  dog.text"
  dog.  text"
  cat. text"
  cat. text "
  </code></pre>
  
  <p>From this data, I want to get only the <code>.text"</code> (or <code>. text "</code>, or <code>.text "</code>, etc.) part but I don't want to include the <code>.text"</code> from any item that contains <code>cat</code>. So far, I am able to get all the <code>.text"</code> but not sure how to exclude the ones with <code>cat</code> word. I have so far <code>\.\s*text\s*"</code> and it gets</p>
  
  <pre><code>cat.text"  &lt;--
  cat.doc"
  dog.txt"
  dog.text"   &lt;--
  frog.txt"
  dog.text"   &lt;--
  dog.  text"  &lt;--
  cat. text"    &lt;--
  cat. text "   &lt;--
  </code></pre>
  
  <p>Any help? Thanks!</p>