mhgoeschl has asked for the wisdom of the Perl Monks concerning the following question:
Hi, using @- and @+ I can get the _offset_ information of any capture porvided I know its ordinal number in the capture list, e.g. $-[2] for (un-named) backref $2. If I work with named backrefs, e.g. (?<myref>), I can easily get its _content_ via $+{myref}. Now, I am seeking to access the _offset_ values of a named backref given its name (here: 'myref') only ? An alternative route would be knowing the ordinal capture number corresponding to a named backref (such that I could access its offset information via the @-/@+ lists). Any idea how to do this ?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: offset of named capture buffer
by Athanasius (Archbishop) on Nov 06, 2012 at 13:51 UTC | |
Re: offset of named capture buffer
by Anonymous Monk on Nov 06, 2012 at 13:43 UTC | |
by Anonymous Monk on Nov 06, 2012 at 13:48 UTC | |
Re: offset of named capture buffer
by AnomalousMonk (Archbishop) on Jan 30, 2013 at 13:11 UTC |
Back to
Seekers of Perl Wisdom