We're updating the issue view to help you get more done. 

Get named capture groups

Description

In #5312 named capture group support was introduced. There are functions (like uregex_groupNumberFromName) to access a matched text by group name or to get the group number if a capture group name is provided.

Yet, the following is missing: allow fetching all named capture groups' names that are defined in a given regex.

This enhancement would be useful in my stringi (http://cran.r-project.org/web/packages/stringi/) package for R, where a user may support any regex. It would be nice if he/she might access matches to capture groups labeled with an informative name. Writing a regex parsing option myself would do the trick, but I guess other ICU users might also find this feature useful.

Environment

Status

Assignee

Andy Heninger

Reporter

TracBot

tracCc

gagolews@9f65c964fe3123b4

tracCreated

Apr 24, 2015, 6:26 PM

tracOwner

andy

tracProject

ICU4C

tracReporter

gagolews@9f65c964fe3123b4

tracStatus

accepted

Components

Priority

major