Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Strip non-numeric

by tall_man (Parson)
on Jan 13, 2003 at 22:54 UTC ( [id://226640]=note: print w/replies, xml ) Need Help??


in reply to Re: Strip non-numeric
in thread Strip non-numeric

There's one extra "/" at the end, and no "g" flag so only one would be removed. You need:
$var =~ s/\D//g;
Update: The "g" was just fixed in the message I replied to, but not the extra "/"
Update 2:Now all the problems are fixed. :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-29 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found