Hi,

On Mon, Feb 1, 2010 at 1:57 PM, sjaffe <sja...@riskspan.com> wrote:
>
> What is the simplest way to extract a matched subexpression?
>
> Eg. in perl you can do
>
> "hello world" =~ m/hello (.*)/
>
> which would return 1(true) and set $1 to the matched subexpression "world".

Read through the documentation and examples in the gregexpr help page
(?gregexpr from the R prompt)

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

______________________________________________
R-help@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.

Reply via email to