Column Regex Rename, strange behaviour


If I try to convert the one and only column of a Table to a fixed name
i.e., by using:
Pattern: .*
Replacement: foo

The column will be named “foofoo”.
Not sure what is happening there. I switched to the normal Rename with variables but thought I should report it.

if possible upload a demo workflow then it is easier to debug

1 Like

If you have one column, why do you choose for the Regex Rename vs the normal rename node?

The Regex one is most suitable if you have multiple columns and want to assign pre- or suffixes for example or do some clean-up. The default state of the node is catered for this already as well.


Regex Rename

1 Like

Thanks! I turned to the Regex Rename first because, in the beginning, I couldn’t figure out how to use variables with the usual Rename because you have to add entries to the list first.
I had a column loop where I could not predict the column name. I figured it out but I just wanted to let the KNIME guys know about this unexpected behavior of the Regex Rename node.

@Daniel_Weikert here the “workflow”. As I said it is just one node.
KNIME_project.knwf (6.5 KB)

1 Like

(.+) does the trick here.

1 Like

Thanks! Apparently .* also matches an additional “null” character…
Then this is solved.

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