Shankha,

With Java Regex'es, by default, the dot-character does not match newlines. So 
(.+) will only match
a single line. On Extract Text, you can change the property named "Enable 
DOTALL Mode" to true,
which should allow the .+ to capture all of the text in the FlowFile.

Thanks
-Mark



> On Feb 17, 2017, at 5:18 AM, shankhamajumdar <shankha.majum...@lexmark.com> 
> wrote:
> 
> Hi,
> 
> I have added ExtractText processor and there added a new property called
> myAttribute with value (.+). Then added AttributesToJSON processor with
> Attributes List as myAttribute. As result I am getting the below json
> structure.
> 
> {"myAttribute":"test elasticsearch"}
> 
> But it's not working for multiline content as the json attribute is taking
> single line only. To resolve this I to keep the entire content in a single
> line. So I have added ReplaceText processor before AttributesToJSON
> processor. In the replace text processor I am trying to replace \n to empty
> space so that entire content can come in a single line. 
> 
> Can you please tell me how to make the entire content in a single line using
> ReplaceText? I have used search value as \n and replacement value as ' '.
> But this is not working properly.
> 
> Please provide some input on this.
> 
> Regards,
> Shankha
> 
> 
> 
> --
> View this message in context: 
> http://apache-nifi-developer-list.39713.n7.nabble.com/NiFi-PutElasticsearch-Processor-tp14733p14774.html
> Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

Reply via email to