Hub
  • Software
  • Blog
  • Forum
  • Events
  • Documentation
  • About KNIME
  • KNIME Hub
  • Nodes
  • String Manipulation (Variable)
NodeNode / Manipulator

String Manipulation (Variable)

Workflow Control Variables
Drag & drop
Like
Copy short link

Manipulates or defines values of variables like search and replace, capitalize or remove leading and trailing white spaces.

Examples:

To remove leading and trailing blanks from a variable with name c0 you would use the expression:
strip($${Sc0}$$)

If you have your customer names in flow variable names with titles Mr and Mister and you want to normalize the data so that only Mr is used you could use the expression:
replace($${Snames}$$, "Mister", "Mr")
or you could combine it to
replace(replace($${Snames}$$, "Mister", "Mr"), "Miss", "Ms")

Or if you want to have the number of characters of the strings in a variable with name text :
length($${Stext}$$)

Note that strings which are part of the expression and are not from the input data (or the result of another wrapped function call) need to be enclosed in double quotes ('"'). Additionally, if the string contains a quote character, it must be escaped using a backslash character ('\"'). Finally, other special characters such as single quotes and backslashes need to be escaped using a backslash. For instance, a single backslash in a string is written as two consecutive backslash characters; the first one acts as the escape character for the second.

External resources

  • KNIME E-Learning Course: Creation and usage of Flow Variables in a KNIME workflow

Node details

Input ports
  1. Type: Flow Variable
    Input variables (optional)
    Input variables (optional).
Output ports
  1. Type: Flow Variable
    Appended variables
    Input variables with an additional calculated variable or one variable replaced.

Extension

The String Manipulation (Variable) node is part of this extension:

  1. Go to item

Related workflows & nodes

  1. Go to item
    Chapter 6 / Exercise 4
    Books KNIME Advanced Luck Row loop
    +4
    Here we have single files, each one containing a data column of a bigger data table. Let'…
    jeany > Public > KNIMEPress > KNIME_Advanced_Luck_4.1_20200525 > AdvancedLuck > Chapter6 > Exercises > Exercise4
  2. Go to item
    forum_15692
    lisovyi > Public > forum_15692
  3. Go to item
    Translate annonimized
    ana_ved > Public > Translate annonimized
  4. Go to item
    concatenate_flow_variables
    lukass > Forum > concatenate_flow_variables
  5. Go to item
    Create dummy CSV files
    Forum
    Create dummy CSV files to read them in a loop
    lisovyi > Public > forum > 12473 > 12473_create_files
  6. Go to item
    Chapter 6 / Exercise 4
    Books KNIME Advanced Luck Row loop
    +4
    Here we have single files, each one containing a data column of a bigger data table. Let'…
    jeany > Public > KNIMEPress > KNIME_Advanced_Luck_4.3_20210222 > Chapter6 > Exercises > Exercise4
  7. Go to item
    Chapter 6 / Exercise 4
    Books KNIME Advanced Luck Row loop
    +4
    Here we have single files, each one containing a data column of a bigger data table. Let'…
    rs1 > Public > KNIMEPress > KNIME_Advanced_Luck_4.4_20210803 > AdvancedLuck > Chapter6 > Exercises > Exercise4
  8. Go to item
    Crear una fecha a partir de una variable
    ana_ved > Public > Crear una fecha a partir de una variable
  9. Go to item
    Integrate Execution Date in File Name
    Path variable Workflow snippet Execution date
    If a workflow is executed on a regular basis you might want to add the execution date to …
    knime > Workflow Snippets > Integrate Execution Date in File Name
  10. Go to item
    Chapter 6 / Exercise 4
    Books KNIME Advanced Luck Row loop
    +4
    Here we have single files, each one containing a data column of a bigger data table. Let'…
    rs1 > Public > KNIMEPress > KNIME_Advanced_Luck_4.5_2022011 > AdvancedLuck > Chapter7 > Exercises > Exercise4
  1. Go to item
  2. Go to item
  3. Go to item
  4. Go to item
  5. Go to item
  6. Go to item

KNIME
Open for Innovation

KNIME AG
Hardturmstrasse 66
8005 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • E-Learning course
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • KNIME Open Source Story
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more on KNIME Server
© 2022 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Credits