title: Regex to match a pattern only if not part of a larger pattern
body: <p>I'm trying to figure out how to write a regex to match a pattern but only if it's not part of a larger pattern I'm not interested in.  For example, I'd like a regex which will match anything containing "foo" except for "foobar"</p>
  
  <p>So it should match "foobaz" or "fooqux" but not "foobar"</p>
  
  <p>Thanks!</p>