Regex String Replacer

Strips out all characters that match a Regex pattern and replaces with the specified string


e.g
Strip out all numerics:
[0-9]

Strip out all alpha:
[A-Za-z]

Strip out all non-alphanumeric:
[^A-Za-z0-9]

Strip out specific characters that cannot be used in Windows file names:
[\\/:\*\?"<>\|]

Note that "\" must be used to escape special regex characters. The supplied regex pattern must be compatible with Java Regex

@takbb 13 Dec 2021,
based on Regex String Stripper component, 29 June 2021 Brian Bates

Options

Column to strip
Choose the column to be processed
Regex String Stripper
Define a regular expression that specifies the characters to be EXCLUDED from the returned string.%%00010%%00010e.g.%%00010%%00010[A-Za-z] => strips out all alphabetic (returns non-alpha)%%00010[0-9] => strips out all numerics (returns all non-numeric)%%00010[^A-Za-z0-9] => (default)strips out all non-alpha-numeric returns all alphanumerics%%00010[\\/:\*\?"<>\|] => Strip out specific characters that cannot be used in Windows file names:%%00010%%00010%%00010
Output Column Name
Specify the name of a new output column
Replace With
Value to use to replace selected pattern%%00010%%00010Leave blank, to simply remove selected pattern

Input Ports

Icon
The dataset containing a String column to which this transformation is to be applied

Output Ports

Icon
The output dataset containing the additional column with the transformation applied

Nodes

Extensions

Links