Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Building Regex Alternations Dynamically

by jo37 (Deacon)
on May 17, 2020 at 09:46 UTC ( [id://11116849]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $regex = sub { qr/@_/ }->(
        join '|',
    ...
        sort { length $b <=> length $a }
        @values);
    print "$regex\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-16 19:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found