Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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?
[shmem]: no doubt, Lady_Aleena - maybe others, too. A whole barrel just for cookies would be too much for one person alone.
[Lady_Aleena]: shmem, I am a wine drinker. 8)

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2017-04-26 10:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (471 votes). Check out past polls.