1Regexp::Common::SEN(3)User Contributed Perl DocumentationRegexp::Common::SEN(3)
2
3
4
6 Regexp::Common::SEN -- provide regexes for Social-Economical Numbers.
7
9 use Regexp::Common qw /SEN/;
10
11 while (<>) {
12 /^$RE{SEN}{USA}{SSN}$/ and print "Social Security Number\n";
13 }
14
16 Please consult the manual of Regexp::Common for a general description
17 of the works of this interface.
18
19 Do not use this module directly, but load it via Regexp::Common.
20
21 $RE{SEN}{USA}{SSN}{-sep}
22 Returns a pattern that matches an American Social Security Number
23 (SSN). SSNs consist of three groups of numbers, separated by a hyphen
24 ("-"). This pattern only checks for a valid structure, that is, it
25 validates whether a number is valid SSN, was a valid SSN, or maybe a
26 valid SSN in the future. There are almost a billion possible SSNs, and
27 about 400 million are in use, or have been in use.
28
29 If "-sep=P" is specified, the pattern P is used as the separator
30 between the groups of numbers.
31
32 Under "-keep" (see Regexp::Common):
33
34 $1 captures the entire SSN.
35
36 $2 captures the first group of digits (the area number).
37
38 $3 captures the second group of digits (the group number).
39
40 $4 captures the third group of digits (the serial number).
41
43 Regexp::Common for a general description of how to use this interface.
44
46 Damian Conway and Abigail.
47
49 This package is maintained by Abigail (regexp-common@abigail.be).
50
52 Bound to be plenty.
53
54 For a start, there are many common regexes missing. Send them in to
55 regexp-common@abigail.be.
56
58 This software is Copyright (c) 2001 - 2017, Damian Conway and Abigail.
59
60 This module is free software, and maybe used under any of the following
61 licenses:
62
63 1) The Perl Artistic License. See the file COPYRIGHT.AL.
64 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2.
65 3) The BSD License. See the file COPYRIGHT.BSD.
66 4) The MIT License. See the file COPYRIGHT.MIT.
67
68
69
70perl v5.32.0 2020-07-28 Regexp::Common::SEN(3)