title: using regular expression to find the urls that do not contain specific word in domain part
body: <p>I want a regular expression to grab urls that does not contain specific word in their domain name but no matter if there is that word in the query string or other subdirectories of the domain.Also it doesn't matter how the hrl starts for exmaple by http/fttp/https/without any of them. I found this expression ^((?!foo).)*$") I don't know how should I change it to fit into these conditions.
  These are the accepted url for the word "foo":</p>
  
  <pre><code>whatever.whatever.whatever/foo/pic
  whatever.whatever.whatever?sdfd="foo"
  </code></pre>
  
  <p>and these are not accepted:</p>
  
  <pre><code>whatever.whateverfoo.whatever
  whatever.foowhatever.whatever
  whatever.foo.whatever.whatever
  whatever.whatever.foo.whatever
  </code></pre>