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 Pattern Title
Expression
^\d{3}\s?\d{3}\s?\d{3}$
Description
Social Insurance Number validator. Canadians only need apply. If somebody could help me (I'm bad at regex), I would like to modify this so that if there is one space after the 3rd digit (or 6th) then there must be one after the 6th (or third).
Matches
123 456 789 | 123456789 | 123 456789
Non-Matches
1234 5678 9 | 123 456 7890 | 123
Author Rating: Not yet rated. Matt Martens
   Displaying page 1 of 1 pages; Items 1 to 1

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