Regex dan

(?=.*foo)(?=.*baz)
Outrageous Opossum