http://www.perlmonks.org?node_id=722233


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

Replies are listed 'Best First'.
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.