Skip to content

Pattern Matching

The Pattern Matching rule validates whether data values in a specified column match one or more defined regular expression patterns.
This rule is commonly used to:

  • Validate standard formats such as emails, phone numbers, or codes
  • Enforce consistent data entry formats
  • Verify compliance with business rules for field patterns

Example Usage:

  • Check that all phone numbers follow international or US formats
  • Ensure email addresses are valid and properly structured
  • Validate password or ID formats against custom regex patterns

Configuration Fields

Rule-Specific Configuration

Field NameDescriptionRequiredData Type / Options
PatternRegular expressions to validate againstYesArray of Strings (String[])

Success Criteria Configuration

This section defines how the rule’s outcome is measured against expected thresholds.

Field NameDescriptionRequiredOptions / Format
OperatorComparison operation for the result countYesGreaterThan, LessThan, EqualTo, Between
Threshold ValueValue for comparison (single value for most operators)ConditionalNumber
Threshold MinMinimum value (for Between operator)ConditionalNumber
Threshold MaxMaximum value (for Between operator)ConditionalNumber
Is PercentageWhether the threshold represents a percentage or countNotrue / false (default: false)
Allow NullsShould null values be treated as validNotrue / false (default: false)
Check For MatchWhen false, validates for negation of the conditionNotrue / false (default: true)

Sample Input Data

IDPhone NumberEmail
1415-555-1234john@example.com
2+44 20 7946 0958NULL
3(650) 555-1234sarah@test.org
4NULLinvalid-email
512345admin@company.com

Sample Configurations

Example 1: Phone Number Pattern Validation

Configuration FieldValue
ColumnPhone Number
Patterns^\+\d{1,3} \d{2,4} \d{4} \d{4}$,
^\(\d{3}\) \d{3}-\d{4}$,
^\d{3}-\d{3}-\d{4}$
OperatorGreaterThan
Threshold Value3
Is Percentagefalse
Allow Nullstrue
Check For Matchtrue

Explanation:
Ensures that phone numbers match either international or US formats. At least 3 matches are required for the rule to pass. Null values are allowed.


Example 2: Email Address Pattern Validation

Configuration FieldValue
ColumnEmail
Patterns^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
OperatorEqualTo
Threshold Value3
Is Percentagefalse
Allow Nullsfalse
Check For Matchtrue

Explanation:
Validates that email addresses follow a standard pattern and that at least 3 records must match. Nulls are treated as invalid.


Sample Output

Column NameRule NameSuccess CountFailure CountNull CountWithin Threshold
Phone NumberPattern Matching410Yes
EmailPattern Matching311Yes