[ https://issues.apache.org/jira/browse/NIFI-2072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17152904#comment-17152904 ]
Malthe Borch edited comment on NIFI-2072 at 7/7/20, 5:14 PM: ------------------------------------------------------------- I would be happy then with "Enable named group support". In terms of what happens if an unnamed capture group is used, I think it would be better to either: - Allow it. I often enough see named captures mixed with unnamed ones, simply because the author has not bothered to use a non-capturing group. - Implement a validation step that scans the expression for unnamed capture groups (i.e. those that are not named and not non-capturing). It would then be an error to use a regex that has unnamed capture groups. was (Author: malthe): I would be happy then with "Enable named group support". In terms of what happens if an unnamed capture group is used, I think it would be better to either: - Allow it. - Implement a validation step that scans the expression for unnamed capture groups (i.e. those that are not named and not non-capturing). > Support named captures in ExtractText > ------------------------------------- > > Key: NIFI-2072 > URL: https://issues.apache.org/jira/browse/NIFI-2072 > Project: Apache NiFi > Issue Type: Improvement > Reporter: Joey Frazee > Assignee: Otto Fowler > Priority: Major > Labels: extracttext > > ExtractText currently captures and creates attributes using numeric indices > (e.g, attribute.name.0, attribute.name.1, etc.) whether or not the capture > groups are named, i.e., patterns like (?<name>\w+). > In addition to being more faithful to the provided regexes, named captures > could help simplify data flows because you wouldn't have to add superfluous > UpdateAttribute steps which are just renaming the indexed captures to more > interpretable names. -- This message was sent by Atlassian Jira (v8.3.4#803005)