Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social Security Numbers (SSN) #21

Open
GeekMasher opened this issue Sep 14, 2022 · 1 comment
Open

Social Security Numbers (SSN) #21

GeekMasher opened this issue Sep 14, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@GeekMasher
Copy link
Collaborator

GeekMasher commented Sep 14, 2022

Name / Description

Social Security Numbers

Sample Snippets

True Positives

123-45-6789

False Positives

Based on a real UK area code, giving the country code beforehand. We don't normally hyphenate phone numbers, but it does happen:

Hey, my phone number is +44-1642-00-0000

[optional] Propose Solution

[0-9]{3}-[0-9]{2}-[0-9]{4}

Before pattern:

\A|[^0-9-]

After pattern:

\z|[^0-9-]
@GeekMasher GeekMasher added the enhancement New feature or request label Sep 14, 2022
@GeekMasher GeekMasher self-assigned this Sep 14, 2022
@aegilops
Copy link
Collaborator

The simplest before/after pair would be \A|[^0-9-] and \z|[^0-9-].

To deal with possible FPs it might make sense to extend it to \A|[^0-9A-Za-z-] and \z|[^0-9A-Za-z-].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants