Extract specific text from a column and add to new column

Hi

I have a data column in a spreadsheet that contains free text notes. I would like to be able to extract certain key words and add them as a new column.

The key words I need to extract are:

Copper
Lead
Galv
Poly
Alkaline
MDPE

If two or more of the words are found in the text column then I would like the output to look like the following examples:

Copper & Lead - output would be Copper / Lead
Copper & Lead & Galv - output would be Copper / Lead / Galv

Is this possible?

Thanks
Chris

@LunarJourneyer

Please stop posting ChatGPT responses, it’s not helpful at all.

3 Likes

hi fostc80857
just to initiate the process, i generated some sample data. unsure if it adequately captures the complexity of your problem. aIso question whether my proposed workflow is the most effective or appropriate method to address this issue and align with your expectations.
image
KNIME_elements-MM.knwf (132.1 KB)
rgds
mm

1 Like

Hi @marzukim

Using your proposed solution as a guide, this is what I have come up with. Uses the rule engine node several times but seems to give me the result I am after (or as close as).

KNIME_elements-CF.knwf (16.9 KB)

Thanks
Chris

1 Like

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