Information Analyzer – REGEX

source-data  [NOT] MATCHES_REGEX pattern-string

You can build your own REGEX based on need. Some examples are listed below:

Postal Codes Example
  • You are searching for all US postal codes in a column (9 bytes with last 4 optional):
Phone numbers Example
  • You are searching for phone numbers in the standard North American format. You want to account for variations in the format such as 123-456-7890, (123)-456-7890, 123 456 7890 , 123.456.7890 and so on:
    '\(?[0-9]{3}\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}'

If you are on 8.5 or 8.7, then you can import a bunch of pre-built rules using the following developerworks article:

The above rules are automatically installed with version 9.1 and beyond.

There are many examples of the use of RegEx functions, including the data rule definition ‘SsnMatchesRegex’


More information

Leave a Reply

Your email address will not be published.