Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: how to go from numbered captures to named?

by perl-diddler (Hermit)
on Jul 15, 2012 at 23:01 UTC ( #981943=note: print w/ replies, xml ) Need Help??


in reply to Re: how to go from numbered captures to named?
in thread how to go from numbered captures to named?

But you can do it from numbered capture groups? In fact they talk about referring to an earlier capture group to invoke recursion. As for the \q<name> -- that was a typo... It's supposed to be \k<name> (or \k'name'), also for the sake of python/pcre, (?P=name) is also accepted. ARG...I see the prob: It is an error to refer to a name not defined by a "(?<NAME>)" earlier in the pattern. the (2) refer's to the 2nd capture group from within the capture group -- for the name that's not ok, the name has to already be defined (hit the end paren)... Dang!


Comment on Re^2: how to go from numbered captures to named?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2014-08-31 04:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls