Skip to content
Back to formatted view

Raw Message

Message-ID: <1292509065093-3090931.post@n4.nabble.com>
Date: 2010-12-16T14:17:45Z
From: Dieter Menne
Subject: Numbers in a string
In-Reply-To: <20101215202051.GA3538@cs.cas.cz>

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.