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 via Regexp::Common. That's the rule. No cap. Go through Regexp::Common or 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 🌈


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:

  1. The Perl Artistic License. See the file COPYRIGHT.AL.
  2. The Perl Artistic License 2.0. See the file COPYRIGHT.AL2.
  3. The BSD License. See the file COPYRIGHT.BSD.
  4. 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