[R] regular expression submatch?

sjaffe sjaffe at riskspan.com
Mon Feb 1 19:57:40 CET 2010


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".

-- 
View this message in context: http://n4.nabble.com/regular-expression-submatch-tp1459146p1459146.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list