This should work:
[file name] [contains all of the words] [foo]
[then apply advanced filter] [contents] [does not contain the regular expression] [] [regular expression]
[then apply advanced filter] [contents] [does not contain the regular expression] [] [regex]