From Thomas Lumley <thomas@biostat.washington.edu>  Thu May 22 17:52:10 1997
From: Thomas Lumley <thomas@biostat.washington.edu> (Thomas Lumley)
Date: Thu, 22 May 1997 09:52:10 -0700 (PDT)
Subject: R-alpha: R-beta: regex
In-Reply-To: <x2n2pnh3h0.fsf@bush.kubism.ku.dk>
Message-ID: <Pine.SUN.3.95.970522094711.8749D-100000@zen>

On 22 May 1997, Peter Dalgaard BSA wrote:
> 
> In what connection? In egrep, consider taking some of them out:
> 

I meant the grep() function in R (which needs \ to be quoted)
 grep("([A-Za-z][^:]*):\1","Ac:Ac",value=T)
character(0)
> grep("([A-Za-z][^:]*):\\1","Ac:Ac",value=T)
character(0)
> grep("([A-Za-z][^:]*):\\\1","Ac:Ac",value=T)
character(0)
> 
but
> grep("([A-Za-z][^:]*):","Ac:Ac",value=T)
[1] "Ac:Ac"


Thomas Lumley
------------------------------------------------------+------
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :
------------------------------------------------------------


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: R-beta: regex
Thomas Lumley