Daniel Falkenberg wrote:
> 
> Hey all,

Hello,

> Just wondering what my best way would be to go about stripping all
> digits from my string.  So far I have the follwoing...
> 
> $string = "08 852365 21 Hello world!";
> 
> $string =~ s/[.*\d\s]//g;
> 
> What does this do exactly?

[] denotes a character class which includes the characters '.' or '*' or
'0' through '9' (\d) or ' ' or "\f" or "\t" or "\r" or "\n" (\s).  If
you just want to remove digits then this will work:

$string =~ tr/0-9//d;



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to