Hub
Pricing About
NodeNode / Manipulator

Column Rename (Regex)

ManipulationColumnConvert & ReplaceStreamable
Drag & drop
Like

Renames all columns based on a regular expression search & replace pattern. The search pattern is a regular expression, possibly containing groups for further back referencing in the replace field.

In the simplest case, you can search and replace string literals. E.g. if the input columns are called "Foo 1", "Foo 2", "Foo 3", etc and the search string is "Foo", the replacement is "Bar", the output would be "Bar 1", "Bar 2", "Bar 3".

More complicated cases contain capturing groups , i.e. expressions in parentheses that, if matched in a column name, are saved. The groups can be referenced in the replacement string using $g , whereby g is a number 0-9. These placeholders will be replaced by the original occurrence in the input column name. For instance, to rename the columns that are produced by the Data Generator node (they follow a scheme Universe_<number1>_<number2> ) to <number2> (Uni <number1>) , you would use as search string: "Universe_(\d+)_(\d+)" and as replacement: "$2 (Uni $1)".

The special sequence $i represents the current column index (unless escaped by '\' (backslash)). E.g. in order to precede each column name with the column index, use as search string "(^.+$)", capturing the entire column name in a group, and as replacement "$i: $1".

Further documentation regarding regular expressions can be found in the Java API documentation, in particular the classes Pattern and Matcher .

Node details

Input ports
  1. Type: Table
    Input
    Arbitrary input data.
Output ports
  1. Type: Table
    Input with renamed columns
    Input table with renamed columns according to configuration parameters.

Extension

The Column Rename (Regex) node is part of this extension:

  1. Go to item

Related workflows & nodes

  1. Go to item
  2. Go to item
  3. Go to item

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • Courses + Certification
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more about KNIME Business Hub
© 2025 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Data Processing Agreement
  • Credits