|P is for Practical|
[RE] match positions of named captures?by LanX (Archbishop)
|on Nov 29, 2019 at 09:04 UTC||Need Help??|
LanX has asked for the wisdom of the Perl Monks concerning the following question:
In continuation of Re^3: Greedy modifier found to be working non-greedy in a named group
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