Match Strings actions

Match Strings actions search the specified column in a Table parameter or dataset to find string values that match one or more regular expressions. The matching strings are written to a Table dataset.

Action property Description
Capture Groups A String List parameter or dataset that includes a column name for each capture group in the ‘Patterns’ regular expressions. These columns are added to the Result dataset and populated with matches from the Source parameter or dataset. The first capture group in the regular expression is mapped to the first column, the second capture group is mapped to the second column, and so on. If there are more columns than capture groups, the extra columns are not populated. If there are more capture groups than columns, the capture groups that can't be mapped to columns are not included in the Result dataset.
Global This Boolean parameter determines whether patterns are replaced globally (true) or whether only the first pattern is replaced (false). The default value is false.
Key Fields (optional) A String List parameter or dataset that contains a list of columns from the Source table which are to be included in the Result dataset. Each item in the list should be stored as a separate string value. This property is only supported if the Global property is set to false.
Nocase If this Boolean parameter is set to true, the regular expression engine ignores case when performing a match. The default value is false, which means that matches are case-sensitive.
Patterns A String List parameter containing a list of regular expressions to be matched against values in the table’s Source Column.
Result A Table dataset that stores the matching column values from the Source parameter or dataset.
Source A Table parameter or dataset that contains a column with string values to be searched.
Source Column A String parameter that contains the name of a column from the Source parameter or dataset. If a value from the Source Column matches against any of the specified patterns, the value is included in the Result dataset.

The Result dataset has the following columns:

Column Description
<Key Fields> Columns from the Source table that are specified in the Key Fields parameter or dataset.
PATTERN The matching pattern from the Patterns dataset.
LINE The row from the Source table’s Source Column where a match was found.
MATCH The text from the LINE column that matches the regular expression in the PATTERN column.
<Capture Groups> The Result dataset also includes each of the columns from the Capture Groups parameter or dataset.

Example

Match Strings action example.

To examine the details for a Match Strings action, double-click the action node, or select View Details from the node’s context menu. The Details screen displays the number of records in the Source and Result tables, and the time taken for the action to complete.

Related topics

Capture groups example

Regular expression examples