Re: [R] Is there a better way to parse strings than this?

From: Hadley Wickham <hadley_at_rice.edu>
Date: Thu, 14 Apr 2011 20:07:10 -0500

> I was trying strsplit(string,"\.\.\.") as per the suggestion in Venables
> and Ripleys book to "(use '\.' to match '.')", which is in the Regular
> expressions section.
>
> I noticed that in the suggestions sent to me people used:
> strsplit(test,"\\.\\.\\.")
>
>
> Could anyone please explain why I should have used "\\.\\.\\." rather than
> "\.\.\."?

Basically,

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 15 Apr 2011 - 01:14:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 19 Apr 2011 - 02:20:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive