in reply to Retrieving Regex matched Group name

I suppose your question is how to get the name of a capture-group by index.

It's not easily possible to associate capture-name to capture-index. We had this recently.

Consider another concept!

But if you just want to know how to access the match for a name use %+

see perlretut: Outside of the pattern a named capture group is accessible through the %+ hash.

Cheers Rolf