RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Social Security Number (SSN)
Expression
(?!219( |\.|\-|)??09( |\.|\-|)??9999|078( |\.|\-|)??05( |\.|\-|)??1120)(?!666|000|9\d{2})\d{3}( |\.|\-|)??(?!00)\d{2}( |\.|\-|)??(?!0{4})\d{4}
Description
Advanced SSN regular expression. Matches 9 digits separated by mixed spaces, hyphens, or periods. Excludes: - Values containing all 0's in any group - Values beginning with 900-999 - 078-05-1120 (Woolworth's Wallet) - Values beginning with 666 Guidelines can be seen at: https://www.ssa.gov/kc/SSAFactSheet--IssuingSSNs.pdf
Matches
001-23-1123 | 377.42.1423 | 389551234 | 389 55.1234
Non-Matches
078051120 | 900 20 2211 | 389.00.4411
Author Rating: Not yet rated. Aaron Guilmette
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials