Community Patterns

Community Library Entry

1

Regular Expression
Created·2025-02-12 18:21
Updated·2025-02-12 18:44
Flavor·PCRE2 (PHP)

/
(?i)\bS(?:ocial|oc\.?|\.)? ?(?!(?:S(?:ecurity|ec\.?|\.)?|Insurance) ?(?:Admin|Insurance|Office|Sec|Tax))(?:(?:S(?:ecurity|ec\.?|\.)?)|(?:Insurance)) ?(?:N(?:\.|o\.?|umbers?|um\.?)?|I\.?D)?(?:\d|#|\.|\b)
/
gm
Open regex in editor

Description

Used to detect supporting keywords in a Purview DLP Sensitive Information Type (SIT).

Purview uses the PCRE-compatible Boot.Regex engine.

This RegEx matches various representations of "Social Security Number", "Social Insurance Number", or "Social Security ID".

Submitted by J. Greg Mackinnon