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

Re^3: Regular expressions: interpolate the variable in the value of the number of repetitions for the group

by rjt (Deacon)
on Aug 03, 2013 at 10:29 UTC ( #1047690=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $binary_data =~ /(.)(.){(?{unpack 'H*', $1})}/; # ?
    /(.)(?{unpack 'H*', $1})(.){$^R}/; # ???
    /(.)((??{'.' x $1}))/;
    /(\d)((??{'.*?\n' x $1}))/;
    
  2. or download this
    /(\d) ([^\d]+?\n)? ([^\d]+?\n)? ([^\d]+?\n)?
          ([^\d]+?\n)? ([^\d]+?\n)? ([^\d]+?\n)?
          ([^\d]+?\n)? ([^\d]+?\n)? ([^\d]+?\n)? /x;
    printf "%d: <%s>\n", $_, eval '$'.$_ for 2..$1+1;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2015-07-02 06:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (30 votes), past polls