tests = c(
"dog cat",
"dogs and cats",
"dog and cat",
"dog and fluffy cats",
"cats and dogs",
"cat and dog",
"fluffy cats and fluffy dogs")
neg_pattern = "^(?!.*dog.*cat).*cat"
grep(neg_pattern, tests, perl = TRUE, value = TRUE)
dGVzdHMgPSBjKAogICAiZG9nIGNhdCIsCiAgICJkb2dzIGFuZCBjYXRzIiwKICAgImRvZyBhbmQgY2F0IiwgCiAgICJkb2cgYW5kIGZsdWZmeSBjYXRzIiwKICAgImNhdHMgYW5kIGRvZ3MiLCAKICAgImNhdCBhbmQgZG9nIiwgIAogICAiZmx1ZmZ5IGNhdHMgYW5kIGZsdWZmeSBkb2dzIikgIApuZWdfcGF0dGVybiA9ICJeKD8hLipkb2cuKmNhdCkuKmNhdCIKZ3JlcChuZWdfcGF0dGVybiwgdGVzdHMsIHBlcmwgPSBUUlVFLCB2YWx1ZSA9IFRSVUUp