The REMatch transformation is a pattern-matching transformation that uses regular expressions to specify one or more patterns to look for and capture in the input.
The transformation constructs an output field for each capturing sub-pattern in the regular expression. If the regular expression does not match the input field, the outputs are blank, and if the output field already exists, the values are replaced by the blank values. For a brief guide to using regular expressions, see Regular Expressions .
The REMatch transformation operates similarly to the RETransform transformation (see RETransform ), which uses regular expressions to capture a string and stores that string in a single output field.
REMatch parses a string more efficiently than multiple RETransform transformations or a single RETransform transformation followed by a Flatten transformation. See Flatten .
|Name||Descriptive name of the transformation. You can enter any name here.|
|Case Sensitive||True or false. Specifies whether the match is case-sensitive.|
|Comments||Optional. Notes about the transformation.|
|Condition||The conditions under which this transformation is applied.|
|Expression||The regular expression used for matching.|
|Input||The field against which the regular expression is evaluated.|
The name of the output string or vector. In the case of string vectors as input, the outputs are also string vectors.
An output field must exist for each capturing sub-pattern in the expression.
REMatch transformations can be very slow and may account for much of the data processing time.
In this example, a REMatch transformation parses a date of the format YYYY-MM-DD into the fields x-year, x-month, and x-day. For the date 2007-01-02, the values of x-year, x-month, and x-day would be 2007, 01, and 02, respectively.