nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Payne <marka...@hotmail.com>
Subject Re: Question with ExtractText Processor
Date Wed, 12 Jul 2017 14:48:25 GMT
Atish,

I believe you will need to escape the pipe with a backslash:

(.+)\|(.+)\|(.+)\|(.+)\|(.+)

Thanks
-Mark


> On Jul 12, 2017, at 10:13 AM, Atish Ray <atray@lexmark.com> wrote:
> 
> Hi,
> I am working with Extract text processor. I have a file which is having Pipe
> Delimited text. I have Spited the file based on every line and now I want to
> extract text from each splited line. I have Difined attribute in ExtractText
> processor as "csv" and given the regex as   (.+)|(.+)|(.+)|(.+)|(.+). 
> 
> Then My expectation is, I will be getting attribute value as csv.1="first
> element of line" ,csv.2="second element of line" ,csv.3="third element of
> line" and csv.4="fourth element of line".
> 
> But it is not working for me. But if I make the file as "," delimited and
> use regex as (.+),(.+),(.+),(.+),(.+), then I am getting the correct
> attribute value.
> 
> Can you please suggest what would be the regex, if I use Pipe delimited
> file?
> 
> 
> Regards
> Atish 
> 
> 
> 
> --
> View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/Question-with-ExtractText-Processor-tp16405.html
> Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.


Mime
View raw message