[R] regular expression

From: array chip <arrayprofile_at_yahoo.com>
Date: Thu, 31 Mar 2011 16:31:56 -0700 (PDT)

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 abcd foo", value=T) should return character(0).

But both returned character(0).



        [[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 31 Mar 2011 - 23:39:50 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:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive