0 ×

String Manipulation (Variable)

KNIME Java Snippet Nodes version 4.4.0.v202106241003 by KNIME AG, Zurich, Switzerland

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


To remove leading and trailing blanks from a variable with name c0 you would use the expression:

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 :

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.


Flow Variable List
The list contains the flow variables that are currently available at the node input. Double clicking any of the entries will insert the respective identifier at the current cursor position (replacing the selection, if any).
Select a single function to display its description. A double click will insert the function in the expression editor. It will replace your current selection or simply insert at the current caret position. Select a category to narrow down the list of displayed functions.
The place for your business logic. You can hit ctrl+space to get an auto completion box.
Specify here if you want the result to be put into a separate or existing flow variable. Note that the flow variable only can be replaced, if the type of it does not change (otherwise there will a new flow variable be appended, with same name, but different type).
Syntax check on close
If unchecked the dialog can be closed even when the expression has syntax errors.

Input Ports

Input variables (optional).

Output Ports

Input variables with an additional calculated variable or one variable replaced.

Best Friends (Incoming)

Best Friends (Outgoing)



To use this node in KNIME, install KNIME Javasnippet from the following update site:


A zipped version of the software site can be downloaded here.

You don't know what to do with this link? Read our NodePit Product and Node Installation Guide that explains you in detail how to install nodes to your KNIME Analytics Platform.

Wait a sec! You want to explore and install nodes even faster? We highly recommend our NodePit for KNIME extension for your KNIME Analytics Platform. Browse NodePit from within KNIME, install nodes with just one click and share your workflows with NodePit Space.


You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.