Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Numbers only in a string

by socketdave (Curate)
on Sep 08, 2005 at 16:01 UTC ( #490249=note: print w/ replies, xml ) Need Help??


in reply to Numbers only in a string

$phone =~ s/\D|^1//g;

Same as davido and sk, but also strips a leading 1 from the number.


Comment on Re: Numbers only in a string
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://490249]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2015-05-06 03:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (130 votes), past polls