How to remove in multiple columns special characters like comma

Hello,

I want to remove in more columns the commas at the beginning, at the end or in the middle of the column.

With the string manipulation node, I joined with seperator three columns and I get this:

Example 1:

Before joining
column A = A1,A2
column B = B1, B2
column C = null

Then i used the node joinSep(", ",$column A$,$column B$, $column C$)

Then I get this result:

A1, A2, B1, B2, => comma at the end of the string sequence

Example 2:

Before joining
column A = A1, A2
column B = null
column C = C1, C2

Then i used the node joinSep(", ",$column A$,$column B$, $column C$)

Then I get this result:

A1, A2, , C1, C2 => commas in the middle of the string sequence

Example 3:

Before joining
column A = null
column B = B1, B2
column C = C1, C2

Then i used the node joinSep(", ",$column A$,$column B$, $column C$)

Then I get this result:

, B1, B2 C1, C2 => comma at the beginning of the string sequence

=> So I get two commas at the end of the column

How can I remove in multiple columns the commas at the end or at the beginning or in the middle of the string sequence?

Thank you.

Hi @Frank2323 ,

Use Column Aggregator node, in option tab select concatenate method.
Untick the Missing.
KNIME_project16.knwf (6.4 KB)

GL,
Mehrdad

2 Likes

Thanks a lot. It works

2 Likes

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