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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Improved SSN
Expression
^((?!000)(?!666)([0-6]\d{2}|7[0-2][0-9]|73[0-3]|7[5-6][0-9]|77[0-1]))(\s|\-)((?!00)\d{2})(\s|\-)((?!0000)\d{4})$
Description
Used Tim Cartwright example and added \s or - for separators.
Matches
455-55-4444|333 22-1111|733 11 1111
Non-Matches
734-00-1111|749-11-0000|666-11-1111
Author Rating: Not yet rated. Bill Fitzpatrick
Source Tim Cartwright
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-2024, RegexAdvice.com | ASP.NET Tutorials