in reply to Re: Refer by relative way to regex group (eg. the last one)
in thread Refer by relative way to regex group (eg. the last one)
> Suggestions:
sigh...
- $+ aka $LAST_PAREN_MATCH
- $^N aka $LAST_SUBMATCH_RESULT
- @{^CAPTURE}
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
update
DB<29> "ab" =~ /^((.)(.))(?{say $+;say $^N; say "$1 $2 $3\n@{^CAPTUR +E}"})/ b ab ab a b ab a b
|
---|
In Section
Seekers of Perl Wisdom