Solved

String: select line from multi line attribute

  • 15 September 2018
  • 2 replies
  • 47 views

Badge +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!

icon

Best answer by takashi 15 September 2018, 09:13

View original

2 replies

Userlevel 2
Badge +17

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.

Badge +2

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.

 

 

Reply