Re: [R] regular expression

From: Bernd Weiss <>
Date: Thu, 31 Mar 2011 20:32:25 -0400

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 mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Fri 01 Apr 2011 - 00:34:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 01 Apr 2011 - 01:00:27 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive