My thought is instead of using Regex function, you can simply use a JAVA snippet to write an if-else statement says if the column contains ‘PLTR’ then ‘PLTR’ elseif column contains ‘CVTR’ then CVTR.
You can use String Manipulation Node with regexReplace
If your strings are only PLTR and CVTR you can use a regular expression like this:
regexReplace(yourColumn, “(PLTR|CVTR)”, “$1”)
If you want match any uppercase string with exactly 4 chars, regex becomes
Sadly, I know nothing about Java coding.
Could you please give me an example of what code you would write to get that “PLTR” and “CVTR” are extracted from VORGANGBEZ column to a new column?
I used the Rule-based Row Filter, but I didn’t want to filter any row as there are some rows which have neither “PLTR” nor “CVTR”. However, I used instead the Rule Engine node as shown below and it worked very well.