Uses a broad, configurable regex library to match likely PII columns.
You can extend it with extra_patterns
(they get ORed in) or replace
everything with a single override_regex
.
Arguments
- x_names
Character vector of column names to check.
- extra_patterns
Character vector of additional regexes to OR in. Examples: c("MRN", "NHS", "Aadhaar", "passport")
- override_regex
Optional single regex string that fully replaces the defaults (case-insensitive). When supplied,
extra_patterns
is ignored.