Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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


Comment on Re: Take digits from a string
Select or Download Code

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 exploiting the Monastery: (7)
As of 2014-08-23 01:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (169 votes), past polls