- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Replacetextprocessor remove blank lines
- Labels:
-
Apache NiFi
Created ‎11-08-2017 12:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,for eg
Thanks a lot this awesome community
I was trying to modify my flowfile to not have a blank line. for example right now it is like
This is message1 This is message2
I want to remove that middle blank line, so it wil become
This is message1 This is message2
I am using replacetextprocessor , but not able to figure out the replacement value?
Attached is my attempt, any pointers or help
Thanks
Dheeru
Created on ‎11-08-2017 01:05 AM - edited ‎08-18-2019 12:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You almost got it right 🙂
In the Replacement Value: type "Shift-Enter" -- this will add a new line as replacement value.
the search value will remove all empty lines and prefix spaces.
Also i have attached a sample template : replace.xml
Created ‎11-08-2017 12:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I treid using the replacement text as (.*)\n but then it is showing
This is message1nThis is message2n
any ideas?
Thanks Dheeru
Created on ‎11-08-2017 01:05 AM - edited ‎08-18-2019 12:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You almost got it right 🙂
In the Replacement Value: type "Shift-Enter" -- this will add a new line as replacement value.
the search value will remove all empty lines and prefix spaces.
Also i have attached a sample template : replace.xml
Created ‎11-08-2017 01:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Adrian Oprea Thanks a lot, appreciate it, almost forgot about the shift +enter 🙂 Thanks again
Created ‎11-09-2017 12:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yeah i know is not very intuitive 🙂
