Regexp:...mon::SEN(3)
β¨ NAME β¨
Regexp::Common::SEN β bestie, this one hands you regexes for Social-Economical Numbers π
(also this page is from the User Contributed Perl Documentation section of the manual, Regexp:...mon::SEN(3) if you're keeping track π)
πΈ SYNOPSIS πΈ
use Regexp::Common qw /SEN/;
while (<>) {
/^$RE{SEN}{USA}{SSN}$/ and print "Social Security Number\n";
}
Like, that's the whole vibe. Load it, match it, print the thing π«Ά
π DESCRIPTION π
Okay so first thing's first: go read the manual for Regexp::Common if you want the general rundown of how this whole interface works, mkay?
π¨ Do not use this module directly, but load it viaRegexp::Common. That's the rule. No cap. Go throughRegexp::Commonor nothing.
π¦ "$RE{SEN}{USA}{SSN}{-sep}"
This one returns a pattern that matches an American Social Security Number (SSN), periodt. SSNs consist of three groups of numbers, separated by a hyphen (-).
Now here's the tea: this pattern only checks for a valid structure. So it validates whether a number is a valid SSN, was a valid SSN, or maybe will be a valid SSN in the future. It's not doing a background check on anybody π. There are almost a billion possible SSNs, and about 400 million are in use, or have been in use β so yeah, lots of possibilities.
If -sep=P is specified, the pattern P is used as the separator between the groups of numbers. Cute, customisable, we love to see it β¨
Under -keep (see Regexp::Common), here's what gets captured:
$1β captures the entire SSN. π$2β captures the first group of digits (the area number).$3β captures the second group of digits (the group number).$4β captures the third group of digits (the serial number).
Four captures, four little besties, all doing their job π
π₯ SEE ALSO π₯
Regexp::Commonβ for a general description of how to use this interface. Literally start here bestie, I'm begging π
π AUTHORS π
Damian Conway and Abigail. Legends, icons, the moment π
π§ MAINTENANCE π§
This package is maintained by Abigail (regexp-common@abigail.freedom.nl). If something's broken, that's your girl π
π BUGS AND IRRITATIONS π
Bound to be plenty. π
For a start, there are many common regexes missing. Send them in to regexp-common@abigail.freedom.nl. Like, please, contribute, the collection needs you π
πΈ LICENSE and COPYRIGHT πΈ
This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.
This module is free software, and maybe used under any of the following licenses:
- The Perl Artistic License. See the file
COPYRIGHT.AL. - The Perl Artistic License 2.0. See the file
COPYRIGHT.AL2. - The BSD License. See the file
COPYRIGHT.BSD. - The MIT License. See the file
COPYRIGHT.MIT.
And that's the whole page, bestie!! π«Ά This lil doc is from perl v5.42.0, dated 2024-08-09, and it lives at Regexp:...mon::SEN(3) in the User Contributed Perl Documentation. Go forth and validate those Social-Economical Numbers, ily, bye!! β¨ππ
π¦ where this page comes from
- opensuse-leap 16.0: perl-Regexp-Common 2024080801.0.0-160000.2.2 Β· Artistic-1.0 OR Artistic-2.0 OR BSD-3-Clause OR MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms