[ 
https://issues.apache.org/jira/browse/NIFI-2072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16063392#comment-16063392
 ] 

Andre F de Miranda commented on NIFI-2072:
------------------------------------------

[~jfrazee] [~pvillard] There is a workaround to this that is using ExtractGrok. 
Grok support named captures (and their extraction into attributes) out of the 
box, making a suitable alternative to the functionality requested here.

All you need to do is to paste a pure regex on the grok pattern and voila. You 
get an attribute {{grok.captureName}} and with the captured value

Unless there are some edge cases where ExtractGrok won't be able to handle I 
suggest this to be a won't fix?



> 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
>
> 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
(v6.4.14#64029)

Reply via email to