Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: capture value from two patterns

by Haarg (Curate)
on Aug 21, 2020 at 07:42 UTC ( #11120954=note: print w/replies, xml ) Need Help??


in reply to capture value from two patterns

my ($id) = grep defined, (m!/key/(\d+)|/(\d+)-\d+!);

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2021-10-22 22:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (85 votes). Check out past polls.

    Notices?