Skip to main content
Solved

String: select line from multi line attribute

  • September 15, 2018
  • 2 replies
  • 148 views

harmen_kampinga
Forum|alt.badge.img+2

Hi all,

I have a multi line string and like to do some adjustments.

For example: remove the first line of the multi line string

How do I select the first line or the first two lines?

Thanks in advance!

Best answer by takashi

Hi @HarmenKampinga, a possible way I can think of is:

  1. split the multi-line string by the newline character with the AttributeSplitter
  2. explode the resulting list with the ListExploder,
  3. filter out undesired lines with the Tester (test the "_element_index" added by the previous ListExploder),
  4. then concatenate remaining lines using the Aggregator (use the "Attributes to Concatenate" option).

Hope this helps.

View original
Did this help you find an answer to your question?

2 replies

takashi
Supporter
  • Best Answer
  • September 15, 2018

Hi @HarmenKampinga, a possible way I can think of is:

  1. split the multi-line string by the newline character with the AttributeSplitter
  2. explode the resulting list with the ListExploder,
  3. filter out undesired lines with the Tester (test the "_element_index" added by the previous ListExploder),
  4. then concatenate remaining lines using the Aggregator (use the "Attributes to Concatenate" option).

Hope this helps.


harmen_kampinga
Forum|alt.badge.img+2
takashi wrote:

Hi @HarmenKampinga, a possible way I can think of is:

  1. split the multi-line string by the newline character with the AttributeSplitter
  2. explode the resulting list with the ListExploder,
  3. filter out undesired lines with the Tester (test the "_element_index" added by the previous ListExploder),
  4. then concatenate remaining lines using the Aggregator (use the "Attributes to Concatenate" option).

Hope this helps.

It helps indeed. Just perfect.

 

Now I need to create a structure, XML style. But I will sort that out.

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings