@james, Yes that was the problem. I changed "Regex Replace" to "Always Replace" and it worked fine. Thanks so much for the help.
On Sat, Oct 1, 2016 at 12:27 AM, James Wing <[email protected]> wrote: > In your ReplaceText processor, is the Replacement Strategy property set to > the default "Regex Replace"? You might try "Always Replace" or changing > the Search Value to ".*" (without quotes). I suspect it is escaping your $ > as part of processing the regex. > > > Thanks, > > James > > On Fri, Sep 30, 2016 at 4:57 AM, Asanka Sanjaya Herath <[email protected] > > wrote: > >> Hi, >> >> I'm using Replace text processor[1] to build a json in my flow file. >> >> Flow file has following attribute: >> >> >> *messageId: [email protected] <http://xx.yy.co>* >> >> Replace text processor "Replacement Value": >> >> *{* >> *"messageId" : "${messageId}"* >> *}* >> >> And all other properties are set to default values. >> >> So that I'm expecting the flow file content output to be this: >> >> *{* >> *"messageId" : "[email protected] >> <http://xx.yy.co>"* >> *}* >> >> But it actually is: >> *{* >> * "messageId" : "001201d20dd3\$7bcdc870\$73695950\[email protected] >> <http://integramicro.co.in>"* >> *}* >> >> All $ characters are combined with a \ character. Can someone help me to >> get rid of these slashes? Any help would be highly appreciated. >> >> [1]. https://github.com/apache/nifi/blob/rel/nifi-1.0.0/nifi-nar- >> bundles/nifi-standard-bundle/nifi-standard-processors/src/ >> main/java/org/apache/nifi/processors/standard/ReplaceText.java >> >> >> >> -- >> Thanks, >> Regards, >> ASH >> > > -- Thanks, Regards, ASH
