$var =~ s/[^0-9]//g; 

-----Original Message-----
From: rory o'connor
To: perl
Sent: 12/6/2001 7:15 PM
Subject: stripping out non-numbers

what would the regex be for stripping out non-numeric characters from a 
string?  I am trying to format phone numers in a standard way, so i want
to 
strip out all the extras people enter like . - ( ) [space]

any help appreciated!

thanks,

rory

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

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

Reply via email to