Try this: gsub("[^0-9]", "", "AB15E9SDF654VKBN?dvb.65")
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 > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ 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.