title: grep - exclude certain domains from url search
body: <p>data_file.txt contains URLs, something like:</p>
  
  <pre><code>bunch of data http://good1.com/contact
  lines of non-url data
  bunch of data http://ok.ip.add.rss/page/1
  lines of non-url data
  bunch of data http://spammer.com/spammers/are/lame
  lines of non-url data
  bunch of data http://good2.com/page2
  lines of non-url data
  bunch of data http://good1.com/contact
  </code></pre>
  
  <p>Some are good URLs, some are spammer URLs.  I'm trying to find all the spammer URLs.</p>
  
  <p>I can find the <strong><em>good</em></strong> URLs with:</p>
  
  <pre><code>grep -n -o -P 'http://(good1.com|ok.ip.add.rss|good2.com).{0,80}' data_file.txt
  </code></pre>
  
  <p><strong><em>I would like to reverse that</em></strong>, finding anything that is <em>not</em> good.  I tried these variants:</p>
  
  <pre><code>grep -n -o -P 'http://*(^(good1.com|ok.ip.add.rss|good2.com)).{0,80}' data_file.txt
  grep -n -o -P 'http://*^(good1.com|ok.ip.add.rss|good2.com).{0,80}' data_file.txt
  grep -n -o -P 'http://*(^good1.com|^ok.ip.add.rss|^good2.com).{0,80}' data_file.txt
  grep -n -o -P 'http://*(^good1.com\|^ok.ip.add.rss\|^good2.com).{0,80}' data_file.txt
  grep -n -o -P 'http://*(^(good1.com|ok.ip.add.rss|good2.com)).{0,80}' data_file.txt
  </code></pre>
  
  <p>...but those didn't work.  Any ideas?</p>