Dear R Users,

if I have a string as follows
x<-"jsda23tth"

How can I extract out 23 as a numeral?
I found
substr(x,5,6)
but, this doesnt work if the number of alphabets differ.

This is another example where the numbers need to be extracted.
x<-c("jsda23tth","fgd54fgd","j3ngh","gfdjh564")

any ideas?

This didnt work.
grep("[/d]",x)

Thanks,
Roy

	[[alternative HTML version deleted]]

