Every team starts with a regex. Emails first, then phone numbers, then a card pattern copied from a forum.
Where patterns fail
A pattern knows shape, not meaning. A 16 digit order number looks like a card. A phone inside an IBAN looks like two matches.
/\b\d{16}\b/ // matches order 1234567890123456
Shape finds candidates. Checks decide.
What a detector adds
Checksums for cards and IBANs. Context words near the match. Overlap rules so one value gets one mask.
Then the part regex cannot give you: an audit log that proves what was masked, and when.
Every team starts with a regex. Emails first, then phone numbers, then a card pattern copied from a forum.
Where patterns fail
A pattern knows shape, not meaning. A 16 digit order number looks like a card. A phone inside an IBAN looks like two matches.
/\b\d{16}\b/ // matches order 1234567890123456
Shape finds candidates. Checks decide.
What a detector adds
Checksums for cards and IBANs. Context words near the match. Overlap rules so one value gets one mask.
Then the part regex cannot give you: an audit log that proves what was masked, and when.
Every team starts with a regex. Emails first, then phone numbers, then a card pattern copied from a forum.
Where patterns fail
A pattern knows shape, not meaning. A 16 digit order number looks like a card. A phone inside an IBAN looks like two matches.
/\b\d{16}\b/ // matches order 1234567890123456
Shape finds candidates. Checks decide.
What a detector adds
Checksums for cards and IBANs. Context words near the match. Overlap rules so one value gets one mask.
Then the part regex cannot give you: an audit log that proves what was masked, and when.