Inserting a new line in text by string replacer

HI @jarviscampbell , what was it that you are then wanting to do at this point? Are you wanting to then aggregate these into the single cell with newlines? If so you can use a column aggregator (using regex/wildcards in the column selection) to aggregate the Data_Arr[ ] columns, and specify \n as the delimiter. You may want to uncheck the “missing” option on the aggregation to handle some columns have no data. Sorry if I’ve misunderstood what you are asking.

1 Like

Hi @takbb , at this point, I simply need to break down the double-lined rows into single lined rows. I would like to stay after that w a single column still. So when I do break them down using a colon as a delimiter, I will have only two columns and not the Array as shown above. Does that make sense?

Btw, I meant to say this before. The examples above are three different ‘iterations’, what I see on Knime, What I get as a result if I copy to a txt editor and third one your prior solution offered.

Also, I do not understand what you mean on your last post. By the time I arrive at the Array portion with Column Aggregate, columns are already separated and it’s too late w more than two columns @takbb

Hi @jarviscampbell , I was having difficult understanding what you were asking, but I was thinking you wanted to bring together your sets of Array columns, which from your last past is still what I believe you are trying to do. I don’t see what it is “too late” just because you have more than array columns, as the column aggregator works with multiple columns.

If I have data delimited by colons:
image

and I split it out into cells with a cellsplitter:

Then this is the point I think you are at.

Each of the split data columns will have a name that I can select in a Column Aggregator using Regex or Wildcards, so it doesn’t matter that there are more than two columns:

(tell it to create a list and remove the aggregation columns)

This then generates list items
image

And the lists can be ungrouped

resulting in:
image

column aggregation after splitting.knwf (11.4 KB)

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.