search for: pjhj24jhjhd

Displaying 1 result from an estimated 1 matches for "pjhj24jhjhd".

2008 Jan 14
2
grep(): returning the matched value
Hi, I'm looking to use the grep function (or something else) to return the matched pattern as opposed to the whole element. For example: x <- c("pjhj24jhjhd") grep("[[:digit:]]{2}", x, value=T) returns "people", whereas I simply want "24". Any help would be appreciated, Thanks, Aidan [[alternative HTML version deleted]]