Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Regex - backreferencing multiple matches in one group.

by moritz (Cardinal)
on Mar 04, 2008 at 11:18 UTC ( [id://671845]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     ((?:\[.*?\]){1,4})
    
  2. or download this
    my @indexes;
    my $re = qr{
    ...
         (?{ push @indexes, $^R}) # store the match
        )+            # as many times as you want
    }x
    
  3. or download this
    re:  (..) (..)+
    vars: $1   $2
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://671845]
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: (3)
As of 2024-04-19 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found