Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Take digits from a string

by johngg (Abbot)
on Nov 26, 2012 at 17:35 UTC ( #1005723=note: print w/ replies, xml ) Need Help??


in reply to Take digits from a string

See tr in Quote and Quote like Operators (it is quite a long way down the page so be patient :-).

$ perl -E ' > $str = q{nPqwe=2456fnraqe=13910feoption}; > ( $newStr = $str ) =~ tr{0-9}{}cd; > say $newStr;' 245613910 $

I hope this is helpful.

Cheers,

JohnGG

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2016-06-26 16:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (330 votes). Check out past polls.