Skip to content

Regex Conditions

A Regex condition matches a column’s sampled values (a sampled subset; see Sampling) against a regular expression: the core pattern-match condition in ALTR Native classification, and the only one most single-rule classifiers need.

  • Pattern — an RE2 regular expression.
  • Comparator — see Classifier Rules: Comparators for the shared pattern-matching options and RE2 case-sensitivity behavior.
  • Match Threshold (optional) — the percentage of sampled values that must match for the condition to pass. Defaults to 80%.

This condition matches a column whose sampled values look like a Social Security number, requiring at least 30% of sampled values to match:

{ "target": "ROW_DATA", "comparator": "matches", "pattern": "\\d{3}-\\d{2}-\\d{4}", "minimum_threshold": 30 }

In Match Confidence scoring, a Regex match outranks a Column Name, Data Location, Data Length, or Column Size match on the same column, but is outranked by Google DLP, Snowflake Native, and Amazon Comprehend matches.

Regex conditions evaluate on every classification job, with no gating by data source or processing location. See Classification Processing Location for the full picture.