[R] Pattern Matching help

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jan 17 18:32:46 CET 2001

> From: Thomas Vogels <tov at ece.cmu.edu>
> Date: 17 Jan 2001 12:26:56 -0500
> Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
> <snip>
> > `.' is a special character in a regexp.   You have to escape it by `\', and
> > that needs to be escaped in R.
> > 
> > Perhaps we need to say more on the help page, but I am reluctant to
> > try to define the meaning of `regular expression' there ....
> </snip> 
> Since perl is a prerequisite for the installation of R, you might
> assume that its man pages are also available.  

Unfortunately it isn't, for a binary installation (and this was on Windows).

> 'man perlre' gives an
> overview of the special characters in the subsection "Regular
> Expressions".  So, could you refer the reader of the help page for
> gsub and friends to the man page of perlre?  (I don't what you would
> do for the Windows people...)

But these are POSIX not Perl regexps.  The latter are more powerful,
and have more special characters, AFAIK.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help 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-help-request at stat.math.ethz.ch

More information about the R-help mailing list