You are here: Processor Library > Transformation > Regex Match

RegEx Match

The RegEx Match processor matches the data in an attribute against a regular expression, and outputs the matching data in a new attribute. It also adds an attribute with an array of all the matched groups within the regular expression.

Note on Regular Expressions

Regular expressions are a standard technique for expressing patterns and manipulating Strings that are very powerful once mastered.

Tutorials and reference material about regular expressions are available on the Internet, including:

and in books, including:

There are also software packages available to help you master regular expressions, such as RegExBuddy, and online libraries of useful regular expressions, such as RegExLib.

Use

Use RegEx Match as a simple way to extract data that matches a regular expression. It is particularly useful where you wish to create an array of groups.

Note that a group in a regular expression is contained between parentheses. A single regular expression may have many groups.

RegEx Match adds two attributes - one containing the value that matched against the whole regular expression, and another containing an array of the matching groups within the regular expression. If there was no match, the new attributes will both be null.

Configuration

Inputs

A single String attribute.

Options

Option

Type

Purpose

Default Value

Regular expression

Regular expression

The regular expression to be matched

None

Outputs

Data attributes

Data attribute

Type

Purpose

Value

RegExMatchFull

Added

Stores the value that matched the whole regular expression

The original input value, where it matched the regular expression, or a null value, where it did not match the regular expression.

RegExMatchGroups

Added

Stores an array of the values matching each group within the regular expression

An array of the values that matched each group of the regular expression.

Flags

Flag attribute

Purpose

Possible Values

RegExMatchSuccess

To indicate whether the RegEx Match was successful or not

Y/N

Execution

Execution Mode

Supported

Batch

Yes

Real time Monitoring

Yes

Real time Response

Yes

Results Browsing

The RegEx Match processor produces a summary view of its results, showing the following statistics:

Statistic

Meaning

Matched

The number of records which matched the regular expression.

Unmatched

The number of records which did not match the regular expression.

Output Filters

The following output filters are available from the RegEx Match processor:

Examples

In this example, the values in an ADDRESS3 attribute are matched against the following UK Postcode regular expression:

([A-Z]{1,2}[0-9]{1,2}|[A-Z]{3}|[A-Z]{1,2}[0-9][A-Z]) +([0-9][A-Z]{2})

Summary View

Drilldown on Matched values

Where values match, an array is created with the values matching each distinct group; that is, Outcode and Incode:

Oracle ® Enterprise Data Quality Help version 9.0
Copyright © 2006,2011 Oracle and/or its affiliates. All rights reserved.