Replace values in Table

../../../../_images/search_replace.svg

Search and replace values in Table.

Documentation

Replacements will be performed in all selected columns.

Regex

If Text replace only (using regex) is checked, the search expression may be a regular expression. Here, it is possible to capture part of the match using parentheses in the search expression. To reuse the part of the match within the parentheses in the use \\1 (or higher numbers) to insert matches.

As an example let’s say that you have an input table with a column containing the strings x_old, y_old, and z_old. If you enter the search expression (.*)_old and the replace expression \\1_new the output will be the strings x_new, y_new, and z_new.

Unless configured to use regex replacement, search, replace and default values will be read as a values of the same type as the column it is replacing in. For details about how to enter values for different types, see Input typed values as text.

Definition

Input ports

table table

Input Table

Output ports

table table

Table with replaced values

Configuration

Select columns (columns)

Select the columns to use perform replace on

Default value (default)

Specify default value

Search (find)

Specify search expression.

Ignore case (ignore_case)

Ignore case when searching

Text replace only (using regex) (literal)

Perform regex replacements in string columns, i.e., columns with types text and bytes, other columns are ignored. Disable this option to replace full values, without using regex across all types of columns.

Replace (replace)

Specify replace expression.

Use default (use_default)

Use default value when not found.

Examples

Implementation

class node_table_value_search_replace.TableValueSearchReplace[source]