1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! US Social Security Number detection.
//!
//! Format: `AAA-GG-SSSS` where:
//! - Area number (AAA) is 001-665 or 667-899 (666 and 9xx historically reserved)
//! - Group number (GG) is 01-99
//! - Serial number (SSSS) is 0001-9999
//!
//! Spaces and dashes are accepted between groups. The format check filters out
//! obvious non-SSNs like `000-00-0000` or `666-12-3456`.
use PatternMatch;
use cratePiiCategory;
use Lazy;
use Regex;
static RE_SSN: =
new;
/// Find all US Social Security Number spans in `text` (format: NNN-NN-NNNN).