Title |
Test
Find
US & Canadian Zip Code for Input
|
Expression |
^(\d{5})$|^([a-zA-Z]\d[a-zA-Z]( )?\d[a-zA-Z]\d)$ |
Description |
Created for input validation of major part of zip code. Normal Canadian entry has an optional space between the first group of three and the second group. Original pattern taken from Steven Smith and modified for our entries. |
Matches |
12345|A6A 6A6|A6A6A6 |
Non-Matches |
aaaaa|6A6A6A |
Author |
Rating:
Not yet rated.
Jeff Finley
|
Source |
Original by Steven Smith |
Your Rating |
|
Title: need to delimit space
Name: lonepie
Date: 2/12/2008 9:48:06 AM
Comment:
In some cases, you may have to replace the ( )? with (\ )? to detect the space