Petr Savicky wrote:
> 
> One of the suggestions in this thread was to use an external program.
> A possible solution without negation in Perl is
> 
>   @a = ("AB15E9SDF654VKBN?dvb.65" =~ m/[0-9]/g);
>   print @a, "\n";
>   15965465
> 
> 

Which is

 gsub("[^0-9]", "", "AB15E9SDF654VKBN?dvb.65")

as Henrique suggested.

Dieter

-- 
View this message in context: 
http://r.789695.n4.nabble.com/Numbers-in-a-string-tp3088623p3090931.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.

Reply via email to