is there a way to use grep to return every file that contains "foo", but not cou...

@ophis@brain.worm.pink

is there a way to use grep to return every file that contains "foo", but not counting "foobar", but not excluding every file with "foobar" either?

like if a file has strings "foo123" and "foobar" it should return positive, and negative only if every single "foo" is inside a "foobar"