How to write an excluding RegEx

2015-05-22 | #solution

Say you want to have everthing _except_ things that include a specific string. For this use case you'll have to use a negative lookahead like this:

^(.(?!stringToExclude))*$