Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://490249]
help
Chatterbox?
[choroba]: I don't believe modules with syntax errors in Synopsis

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2017-02-27 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (383 votes). Check out past polls.