On Wed, Dec 15, 2010 at 11:08:06AM -0200, Henrique Dallazuanna wrote: > Try this: > > gsub("[^0-9]", "", "AB15E9SDF654VKBN?dvb.65")
Consider also strsplit("AB15E9SDF654VKBN?dvb.65", "[^.0-9][^.0-9]*") [[1]] [1] "" "15" "9" "654" ".65" PS. > On Wed, Dec 15, 2010 at 6:55 AM, Luis Felipe Parra < > felipe.pa...@quantil.com.co> wrote: > > > Hello, I have stings which have all sort of characters (numbers, letters, > > punctuation marks, etc) I would like to stay only with the numbers in them, > > does somebody know how to do this? > > > > Thank you > > > > Felipe Parra ______________________________________________ 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.