Hi, guys. I want to create a new column according to a regular expression like this.
Which node should I use in KNIME? Thanks!
Hi, guys. I want to create a new column according to a regular expression like this.
Hi @ThomasChen
To create a new column based on a regular expression in KNIME, you can use either the String Manipulation or Column Expressions node. Both provide powerful Regex functions to achieve this.
Here a simple exemple how to use a Regex function with String Manipulation node.
And the result
Note that the syntax of regular expressions in KNIME has some particularities. For instance, to use \d+
to specify one or more digits, a double escape is required, resulting in \\d+
. This is what I used in the example above.
This double escaping will also apply whenever you use capturing groups or similar constructs in your regular expressions.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.