[R] using grep

kayj kjaja27 at yahoo.com
Fri Feb 26 21:02:22 CET 2010


Hi ,

I have tried

gsub(".*York(\\d+).*", "\\1", grep("New York", x, value = TRUE)) 

and outputs 

 "P New York722AZ" "K New York20" 
but that is not what i want, I want the output to be 

722,20


-- 
View this message in context: http://n4.nabble.com/using-grep-tp1571102p1571251.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list