[R] matching period with perl regular expression

Dieter Menne dieter.menne at menne-biomed.de
Thu May 14 10:40:43 CEST 2009


Gabor Grothendieck <ggrothendieck <at> gmail.com> writes:

> 
> R interprets backslash to give special meaning to the next character, i.e.
> it strips off the backslash and send the following character to gsub
> possibly reinterpreting it specially (for example \n is newline).  Thus
> a backslash will never get to gsub unless you use a double backslash.

To quote Peter Dalgaard:

"The generic rule for backslashes is that you need twice as many as you thought"

Only make sure that you have the right stopping rule for recursive evaluation of
that.

Dieter




More information about the R-help mailing list