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 US and Canada zip code validation
Expression
^(\d{5}-\d{4}|\d{5}|\d{9})$|^([a-zA-Z]\d[a-zA-Z]( )?\d[a-zA-Z]\d)$
Description
Will match any valid US or Canada zip code
Matches
12345, 12345-1234, A1A 1A1, A1A1A1
Non-Matches
123451234, 1234, 1A1 A1A
Author Rating: The rating for this expression. Pavel Terakopov
   Displaying page 1 of 1 pages; Items 1 to 1

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