R-alpha: R-beta: regex
Thomas Lumley
Thomas Lumley <thomas@biostat.washington.edu>
Thu, 22 May 1997 09:52:10 -0700 (PDT)
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-