Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Evaluating code in a regex at runtime: (??{...})

by Athanasius (Archbishop)
on Jan 28, 2013 at 08:44 UTC ( [id://1015641]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    /(....)...(...)...((??{foo()}))....(...)/
     ^        ^       ^                ^
     1        2       3                4
    
  2. or download this
    use Modern::Perl;
    
    ...
    my @caps = $str =~ /(a)b(c)d((??{'(.)' x 5}))e(f)/;
    
    say join(', ', @caps);
    
  3. or download this
    18:33 >perl 504_SoPW.pl
    a, c, $$$$$, f
    
    18:38 >
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2024-04-19 16:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found