I had the need to figure out how to parse a string and pull out any words that didn't contain "Foo" in them. After a lot of cursing, I came up with something that works. For the string "Which BarFoo Is It Foo Bar":
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/\b((?![\w]*Foo)\w+)\b/ |
Yields: "Which", "Is", "It", "Bar"
Regular expressions are diabolical.