KNIME Cell Splitter String Value

Hi- I’m having issue using cell splitter node to split into 3 column

It keep showing the bracket while I want to split below sample

Dummy
SAMPLE {TEST} [123456] (543210)

Into this value

Dummy Dummy-1 Dummy-2
SAMPLE {TEST} 123456 543210

Is there a better way to split and remove the delimiter completely? in which the “SAMPLE” can have different length in text

Thanks in Advance!

Hi @andersenyunan, does your data always contain brackets of the form shown? And can such brackets appear anywhere else in the data? If it is always in the format shown, then I’d think the regex splitter node might be more suitable for your needs, but I think we need a little more information.

That said, what config are you currently using for splitting the cell? It may be that there is a simple solution to what you need to do, if we know what you are currently doing.

2 Likes

Depending on your answers re the data structure, the attached regex split may suit your needs, for example.

demo regex splitting.knwf (6.8 KB)

image

image

The regex pattern
(.*\}).*\[(.*)\].*\((.*)\)

Will divide the cell into three parts:

  1. Everything up to and including the first }(.*\})
  2. Everything between [ ]\[(.*)\]
  3. Everything between ( )\((.*)\)
5 Likes

Hi @takbb

Thanks a lot it works perfectly!
Yes the data always contain brackets from the sample shown

2 Likes

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