Re: [R] Number of words in a string

From: Hans-Joerg Bibiko <bibiko_at_eva.mpg.de>
Date: Thu, 10 Apr 2008 08:31:10 +0200

On 10 Apr 2008, at 07:43, Shubha Vishwanath Karanth wrote:
> So powerful, the gsub... But I really donít understand the how the
> regular expressions like " *\\S+$", need to be used and how to make
> best use of it... Any article/material/links that I can go through?

A good starting point is: type

?regex

in your console.

Furthermore search in the net for "regular expression".

http://en.wikipedia.org/wiki/Regular_expression
http://en.wikipedia.org/wiki/Regular_expression_examples
http://www.regular-expressions.info/

There are some variants of regexp engine on the market but the core syntax should be the same.

Regards,

--Hans



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 Thu 10 Apr 2008 - 06:47:19 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 Thu 10 Apr 2008 - 07:30:28 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