Extract a text between delimiters

Hello, I have a string that contains this information, this is part of a full text:

0

I’m looking for the equivalent of a “Extract text between delimiters”.
My delimiters are “Name:” and “Email:”.
1

I have tried the string manipulation node according to the trouble shooting of the KNIME Community, but is not working as expected and I have no idea on how to set this up correctly.

The expected result is to have “First Name, Last Name” on my “Body.TextBody” column

Could you please upload your example with its exact configuration? Its a difficult to understand the formatting from the screenshot.

1 Like

Here are two Solutions

  1. Use String Manipulation Node with following Expression
    substr($Body.TextBody$,5, indexOf($Body.TextBody$,“Email:”)-6)

  2. Using Cell Splitter Nodes in sequence and specify delimiters as Name: and Email:
    respectively

Below is attached sample workflow

QnA2.knwf (27.4 KB)

2 Likes

Hi @Annag,
Welcome to the KNIME community,

Another option, using the regexReplace example in String Manipulation, is this:

regexReplace($Body.TextBody$,"Name:\\s*(.*)\\s*Email:.*","$1")
2 Likes

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