Regular Expression

Available with ArcGIS Pro Standard and Data Reviewer licenses.

Summary

The Regular Expression check searches for text strings listed for each string field in a feature class or table and returns strings that don't match the specified format or values.

Supported workflows

ArcGIS Data Reviewer checks support multiple methods for implementing automated review of data. The following table identifies the supported implementation methods for this check:

ValidationConstraint

Reviewer batch job

Attribute (validation) rule

No

Yes

Yes

(ArcGIS Pro 2.9 and ArcGIS Enterprise 10.9.1 or later)

Overview

String fields use alphanumeric strings as their values. They include fields that contain the feature's name, measurements (height, length, width, and area), z-values, and metadata such as a feature's creation date.

When a string is found that does not match the format or values specified, the table row is returned as an error. For example, to find records that have an incorrect Social Security number (SSN) format, you can type \b[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]\b in the SSN field. The check returns features or rows that have incorrect SSN field values, such as 123456789, 123-ab-4567, 1123-34-12345, or 123-4567.

When you are searching multiple fields, you need to create multiple expressions. With multiple expressions, one result is returned for one or more fields that do not match the corresponding expressions. For example, if you choose two string fields and only one matches your expression, a result is returned referencing the one field that does not match. If neither field matches the two expressions, one result is returned for the two unmatched expressions.

You can run the Regular Expression check on an entire feature class, a subtype, or a set of features selected using an SQL query.

Note:

Regular Expression checks that were exported in a previous version of ArcGIS Pro must be re-exported with ArcGIS Pro 3.1 to accommodate import changes.

Syntax

ParameterRequiredDescriptionWorkflow

Subtype

No

The subtype to which the rule is applied.

Validation

Attribute

No

A query that identifies the features to which the rule is applied.

Validation

Search Goal

Yes

The attribute fields and the regular expression conditions that are evaluated by the rule.

Validation

Name

Yes

A unique name for the rule.

This information is used to support data quality requirement traceability, automated reporting, and corrective workflows.

Validation

Description

No

A description of the error you define when a noncompliant feature is found.

This information is used to provide guidance to facilitate corrective workflows.

Validation

Severity

Yes

The severity of the error assigned when a noncompliant feature is found.

This value indicates the importance of the error relative to other errors. Values range from 1 to 5, with 1 being the highest priority and 5 being the lowest.

Validation

Tags

No

The tag property of the rule.

This information is used in rule authoring and management workflows to support traceability and reporting of data quality requirements.

Validation

Notes

Keep the following in mind when using the check:

  • If this check was exported in a previous version of ArcGIS Pro, it must be re-exported with ArcGIS Pro 3.1 to accommodate import changes.
  • This check only appears in the Ready to Use Rules gallery when string fields that are not system generated are present in the feature class or table.
  • You can author this check for read-only string fields.
  • Only input features with a validation status of 2 (No calculation required, validation required, no error), 3 (No calculation required, validation required, has error(s)), 6 (Calculation required, validation required, no error), or 7 (Calculation required, validation required, has error(s)) are considered during rule evaluation.
  • The Attribute filter parameter is limited to comparison (=, <>, >, <, >=, <=) and logical (AND/OR, IN/NOT IN, LIKE/NOT LIKE, IS NULL) operators.
  • The Attribute filter parameter does not support the following field types: Big Integer, Date Only, Time Only, and Timestamp Offset. If selected, the row header will turn red and will not allow the rule to save.

Related topics