Displaying 1 result from an estimated 1 matches for "boofoo".
Did you mean:
booboo
2009 Jun 22
2
negation in grep
Does anybody know how to negate a string in a grep command, i.e.,
what I need is to return only strings that do NOT contain a second
string anywhere in the entire string.
for
txt <- c("boo","goo","doob","foo","boofoo")
I need a grep command that returns strings with "oo" except when "b"
is present anywhere. I know that
grep("[^b]oo" would work to exclude "boo" and "boofoo" but not "doob"
So, what I need is
grep("oo + some syntax", t...