Regular Expressions 101

Community Patterns

Find SSN

0

Regular Expression
PCRE (PHP <7.3)

/
[0-9]{9}|\d{3}[ -]*\d{2}[ -]*\d{4}|[ -]*(?:[0-9][ -]*){9}
/
gm

Description

This will find SSN in multiple forms in a document. Source for ED https://www.jscape.com/blog/bid/79591/exploring-regular-expressions-in-dlp

Submitted by anonymous - 6 years ago