Hi, I am stuck on this: how to specify a match pattern that means not to include "abc"? I tried: grep("^(abc)", "hello", value=T) should return "hello". while grep("^(abc)", "hello abcd foo", value=T) should return character(0). But both returned character(0). Thanks John [[alternative HTML version deleted]]
Am 31.03.2011 19:31, schrieb array chip:> Hi, I am stuck on this: how to specify a match pattern that means not > to include "abc"? > > I tried: > > grep("^(abc)", "hello", value=T) should return "hello".> grep("[^(abc)]", "hello", value=T) [1] "hello" HTH, Bernd