Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: \g{-2} for inside (?{ ... })

by Petras (Friar)
on Nov 07, 2008 at 14:57 UTC ( #722233=note: print w/ replies, xml ) Need Help??


in reply to \g{-2} for inside (?{ ... })

Might one suggest:

use 5.010; # re features use strict; use warnings; #for ('abcdef') { # m{ # (?(DEFINE) # (?<x> # ( . ) ( . ) # (?{ '...' }) # ) # (?<y> # ( . ) ( . ) # (?{ print("(???,$^N)") }) # ) # (?<z> # ( . ) ( . ) # (?{ '...' }) # ) # ) # # (?&y)+ # }x; #} print "(a,b)(c,d)(e,f)"; print("\n");

:~)

Cheers! ~P

Ready.
poke 53280,0
poke 53281,0
ctrl+2 load "zork",8,1

West of House


Comment on Re: \g{-2} for inside (?{ ... })
Download Code
Re^2: \g{-2} for inside (?{ ... })
by wol (Hermit) on Nov 07, 2008 at 17:43 UTC
    Thankyou - your post means I no longer have an urge to make the same suggestion. :-)

    That said, your solution doesn't work for me (using Perl 5.8) - would you consider changing the first line thus:

    #use 5.010; # re features

    --
    .sig : File not found.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-11-23 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (134 votes), past polls