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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find 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
Source
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

Title: mr
Name: Mr.F
Date: 3/18/2014 9:14:01 AM
Comment:
I love this


Title: mr
Name: Mr.F
Date: 3/18/2014 9:12:50 AM
Comment:
I love this


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