expect_column_values_to_not_match_regex_list
Feb 24, 2026
·
5
min read
Values format
·
dbt-expectations
·
Column
How it Works
The expect_column_values_to_not_match_regex_list test from the dbt-expectations package validates that column values do not match any pattern from a list of regular expressions. By default, values must avoid all patterns in the list (match_on: any), but you can configure match_on: all to require that values avoid every pattern simultaneously.
Steps and Conditions
Column Selection: Choose the column to validate.
Define Exclusion List: Provide the regex patterns that values must NOT match using
regex_list.Match Mode: Set
match_ontoany(default) orall.Execution: Each value is tested against all patterns.
Outcome: Pass if no values match any pattern (or all patterns for
allmode); fail otherwise.
Example Usage: Data Sanitization
A data sanitization layer wants to ensure that no values in a comment column contain patterns associated with credit card numbers or social security numbers.
Any comment matching credit card or SSN patterns triggers a failure for PII remediation.





