Renaming all headers with taking over char. of the existing ones

I have the problem that I have headers which contains characters which I need and some which I have to delete. Little examples:


I need all characters right from the hyphen. I read some article with contains the extract Column Header, but I have no idea how to continue.
Hope someone can help me.

Thanks an stay healthy in that days

Hi there @juergen01,

welcome to KNIME Community Forum!

For your task there is Column Rename (Regex) node. Use following expression:


with $2 as replacement.

Other approach (a bit longer) would be to extract all column headers using Extract Column Header node, then apply Transpose node to have headers in one column after which use string (or again regex) function from String Manipulation to obtain everything right from hyphen. Then a bit data manipulation together with Insert Column Header node to have your desired column names.


1 Like

This also works


Hi together,

The problem is solved. Many thanks to you. Have a nice weekend.


1 Like

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