Title |
Test
Find
Social Security Number
|
Expression |
^(?!000)(?!666)(?!9)\d{3}([- ]?)(?!00)\d{2}\1(?!0000)\d{4}$ |
Description |
Updated SSN regex. A very simple one for verifying a properly formatted US social security number. First three digits must be 001 - 899 and not 666. Disallows all zeros in a group. |
Matches |
123-45-6789 |
Non-Matches |
123-45 6789 | 1234-56-7890 | 123-00-7890 |
Author |
Rating:
tedcambron
|
Source |
|
Your Rating |
|
Title: Updated
Name: Ted Cambron
Date: 2/12/2008 10:02:36 PM
Comment:
I updated it so that the first three digits must be 001 - 772 like a real social security number.
Title: Can Be Improved
Name: Ted Cambron
Date: 2/11/2008 3:08:02 PM
Comment:
The first three digits should be 001 to 772. I will update later.