Regular Expressions 101

Community Library

Community Library Entry

1

Regular ExpressionOpen Workspace

"
.*\b((?:(?!666|000)[0-8][0-9_]{2}[.-]?(?!00)[0-9_]{2}[.-]?(?!0000)[0-9_]{4}|[0-9]{9}))\b.*
"
gm

Description
Created·2022-03-16 19:30
Type·Match
Flavor·Java

If for whatever reason there isn't a delimiter within your data to for storing your SSNs you should be able to use this regular expression to capture 9 digit strings within data. You might need to add special keywords to filter out false positives.

Submitted by loganmcampbell
Open Workspace