From p.dalgaard@kubism.ku.dk  Thu May 22 18:15:44 1997
From: p.dalgaard@kubism.ku.dk (Peter Dalgaard BSA)
Date: 22 May 1997 19:15:44 +0200
Subject: R-alpha: R-beta: regex
In-Reply-To: Thomas Lumley's message of Thu, 22 May 1997 09:52:10 -0700 (PDT)
References: <Pine.SUN.3.95.970522094711.8749D-100000@zen>
Message-ID: <x2k9krh1hb.fsf@bush.kubism.ku.dk>

Thomas Lumley <thomas@biostat.washington.edu> writes:

> 
> 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"
> 

I strongly suspect that no number of \s will make it work as long as
do_grep() in main/character.c contains this line:

        eflags = REG_NOSUB;



-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
Peter Dalgaard BSA