/^((?!REGULAR_EXPRESSION_HERE).)*$/
For example, if you want to find every lines where the first character is NOT 2 to 4 "f" followed by "oo" and then "bar" somewhere else on the line, you can use:
/^((?!^f{2,4}oo.*bar).)*$/
Example:
"foo+bar"[/^((?!^f{2,4}oo.*bar).)*$/] => "foo+bar"
"fffoo+bar"[/^((?!^f{2,4}oo.*bar).)*$/] => nil
" fffoo+bar"[/^((?!^f{2,4}oo.*bar).)*$/] => " fffoo+bar"
"fffffoo+bar"[/^((?!^f{2,4}oo.*bar).)*$/] => "fffffoo+bar"
For the references, those ideas came from the Vim tips section here.
I hope this will help someone.