Member since
02-15-2019
7
Posts
0
Kudos Received
0
Solutions
05-02-2019
04:45 PM
Thanks Matt, I didn't realize that the colored text was not a comment in this case.
... View more
05-02-2019
02:59 PM
With the '\' character, the '#' character still highlights the text after it as a comment:
... View more
05-02-2019
02:20 PM
I'm trying to use regex to match the line: # DOG CAT BIRD NiFi regex seems to treat # as a comment character, whereas other regexes do not. How do I match the literal character # in a string with regex? The doc page https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#escaping doesn't seem to help me out here.
... View more
Labels:
- Labels:
-
Apache NiFi
02-27-2019
01:54 PM
@Shu In regards to your second option, using a ReplaceText processor: I can successfully use regex to match with existing lines, but I can't seem to extract only the text that I matched with. When using a replacement value of $1, I still end up with the lines that I did not want to save. For example, if my text is: cat dog fish dog bird I can successfully capture the "dog" lines, but when my Replacement Value is set to $1, the result is still: cat dog fish dog bird I'm not sure how I can use ReplaceText to extract only the lines that I match with.
... View more
02-27-2019
12:35 AM
Given a flowfile of text, I'm trying to extract certain lines from it using regex and pass ONLY those lines onto the next processors. For example, if I have the text: cat dog fish dog bird I only want to extract the lines with "dog", then put those lines into their own flowfile that would look like: dog dog I understand that using an ExtractText processor is probably my best bet in this case, but I'm not sure of how this processor is used correctly. I've read multiple questions where the answer describes how to grab specific text and store them into attributes, but the answers always stop there. I need to know how I can then use those attributes and pass them to another processor, and how to make that processor only use those attributes that ExtractText caught. TL;DR: How do I use ExtractText to grab specific lines, then pass those lines to another processor, and then how do I use that processor to spit out the previously grabbed lines?
... View more