Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: find all numeric values from a string and join them

by davido (Cardinal)
on May 18, 2018 at 16:09 UTC ( [id://1214863]=note: print w/replies, xml ) Need Help??


in reply to Re: find all numeric values from a string and join them
in thread find all numeric values from a string and join them

"A concept is valid in Perl only if it can be shown to work in one line."

perl -MRegexp::Common -E 'my $string = "EEH_ErrorCode=( 15, /* Compone +nt */ 65 /* Error */)"; say join("|", $string =~ m/($RE{num}{int})/g) +'

Dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-18 18:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found