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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Social Security Number (SSN) issued after 6/25/2011
Expression
^(?!000)(?!666)(?!9)\d{3}[- ]?(?!00)\d{2}[- ]?(?!0000)\d{4}$
Description
I am publishing this regex that was written by Stephen M. Redd and taken from the following URL: http://www.reddnet.net/regular-expression-for-validating-a-social-security-number-ssn-issued-after-june-25-2011/. It allows a dash or space separator and accounts for the new numbers that were previously restricted prior to June 25, 2011.
Matches
123456789 | 123-45-6789 | 123 45 6789
Non-Matches
000456789 | 000-45-6789 | 000 45 6789
Author Rating: Not yet rated. Joseph Marinello
   Displaying page 1 of 1 pages; Items 1 to 1

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