[FEA] Support for named capture groups in regex patterns
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
Support for capture groups in cudf extract does not include named capture groups as defined here https://www.regular-expressions.info/refext.html
The cudf regex pattern parser does not recognize named capture groups so one part of the solution would be to allow them with another part to find a way to return them. The results are generally a column per group and the names would become the corresponding column names/titles.
One solution is to parse the pattern for the capture group names and remove them before invoking the regex compiler and engine. The names would corresponding directly (in order) to the return columns.
If the libcudf regex parser/compiler allowed and recognized the names, a method could be added to the [RegexProgram](https://docs.rapids.ai/api/cudf/stable/pylibcudf/api_docs/strings/regex_program/#pylibcudf.strings.regex_program.RegexProgram) to return them.
Contributor guide
Assessment
This issue has not been assessed yet.