Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

find line with string and remove blank space nifi

New Contributor

i have a flowfile text and i need remove a blank space in specific line (find line with string) :


example :

toto tata toto titi

serve ng angular

to bind sspk nifi processor camelCase

 ==> find (bind) :

output :

toto tata toto titi

serve ng angular

to bindsspknifiprocessorcamelCase / to bind_sspk_nifi_processor_camelCase


tkt u



you can do that using ExtractText Processor to extract the line that you need with word "bind" into an attribute using regular expression "(bind.+$)", then you ReplaceText processor to basically located the same line using the same regular expression and the the replacement  value is the attribute from the ExtractText processor (assume its called XYZ) like this ${XYZ:replace(" ","")}