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 U.S. Social Security Numbers
Expression
[/,,/.,/=,\s]([0-6]\d{2}|7[0-6]\d|77[0-2])(\s|\-)?(\d{2})\2(\d{4})[/,,/.,\s]
Description
Searches for US SSNs that have either a white space, ".", ",", or "=" in front and either a white space, ".", or "," at the end. Ensures that sets are separated with the same format (either spaces, dashes, or nothing).
Matches
123-45-6789 | 123456789 | 123 45 6789 | =123-45-6789 | .123456789 | end. 123 45 6789
Non-Matches
&123-45-6789 | 1234567890 | 123 45 6789z | 123-456789 | 12345-6789
Author Rating: The rating for this expression. John Stoker
   Displaying page 1 of 1 pages; Items 1 to 1

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