Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Numbers only in a string

by Roy Johnson (Monsignor)
on Sep 09, 2005 at 12:06 UTC ( [id://490534]=note: print w/replies, xml ) Need Help??


in reply to Numbers only in a string

Another job for tr:
$phone =~ tr/0-9//dc;
[oops, didn't see trammell's reply when I posted this redundant one]

Caution: Contents may have been coded under pressure.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-03-28 17:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found