LanX has asked for the wisdom of the Perl Monks concerning the following question:
I googled and could only find this SO discussion match-positions-of-named-capture-groups-in-perls-regexps but poor Felix didn't get a proper answer.
Though I slightly remember we already had this discussion here...
(something like finding the index of a named capture and accessing @+ / @- probably? Hint: %- doesn't help here)
I tried to look into Tie::Hash::NamedCapture , the "Pragmatic Module" used to implement %+ and %- but stopped at the XS barrier
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [RE] match positions of named captures?
by Veltro (Hermit) on Dec 02, 2019 at 15:23 UTC | |
by LanX (Saint) on Dec 02, 2019 at 17:13 UTC | |
|
Re: [RE] match positions of named captures?
by haukex (Archbishop) on Dec 02, 2019 at 18:30 UTC | |
|
Re: [RE] match positions of named captures?
by QM (Parson) on Dec 02, 2019 at 12:19 UTC |