in reply to Finding a string not containing a string

You can control which modifiers apply to any portion of a regex. In the regex snippit below, "foo" will be matched in a case-sensitive manner (the "i" modifier will not apply).
(?-i:foo)