R-alpha: S-help (and S-help-to-R-help)

Peter Dalgaard BSA p.dalgaard@kubism.ku.dk
22 May 1997 18:32:43 +0200


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

> On the related subject of regular expressions, I'm having trouble with the
> \1 construction for the last matched expression
> (eg  \([a-zA-Z][^:]*\):\1 which I think should match things of the form
> blah:blah)
> No matter how many extra \ characters I put in it doesn't work.

In what connection? In egrep, consider taking some of them out:

$ egrep '([a-zA-Z][^:]*):\1'
blah:blah
blah:blah
a:a
a:a
A.
A:
A:A
A:A
A:AB
A:AB
AB:B
AB:B
AB:AB
AB:AB
AB:A


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