Displaying page
of
pages;
Items to
Title |
Test
Details
ZIP+4 - XXXXX-XXXX
|
Expression |
^\d{5}-\d{4}$ |
Description |
Numeric and hyphen 5+4 ZIP code match for ZIP+4. |
Matches |
22222-3333 | 34545-2367 | 56334-2343 |
Non-Matches |
123456789 | A3B 4C5 | 55335 |
Author |
Rating:
Steven Smith
|
Title |
Test
Details
US ZIP (5 or 5+4)
|
Expression |
^\d{5}$|^\d{5}-\d{4}$ |
Description |
This regular expression will match either a 5 digit ZIP code or a ZIP+4 code formatted as 5 digits, a hyphen, and another 4 digits. Other than that, this is just a really really long description of a regular expression that I'm using to test how my front page will look in the case where very long expression descriptions are used. |
Matches |
55555-5555 | 34564-3342 | 90210 |
Non-Matches |
434454444 | 645-32-2345 | abc |
Author |
Rating:
Steven Smith
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$ |
Description |
This expression matches three different formats of postal codes: 5 digit US ZIP code, 5 digit US ZIP code + 4, and 6 digit alphanumeric Canadian Postal Code. The first one must be 5 numeric digits. The ZIP+4 must be 5 numeric digits, a hyphen, and then 4 numeric digits. The Canadian postal code must be of the form ANA NAN where A is any uppercase alphabetic character and N is a numeric digit from 0 to 9. |
Matches |
44240 | 44240-5555 | G3H 6A3 |
Non-Matches |
Ohio | abc | g3h6a3 |
Author |
Rating:
Steven Smith
|
Title |
Test
Details
Pattern Title
|
Expression |
[0-9]{4}\s*[a-zA-Z]{2} |
Description |
Dutch zip code expression
4 numbers - space yes/no - 2 letters
|
Matches |
1054 WD | 1054WD | 1054 wd |
Non-Matches |
10543 |
Author |
Rating:
Not yet rated.
Roland Mensenkamp
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d{5}(-\d{4})?$ |
Description |
Matches standard 5 digit US Zip Codes, or the US ZIP + 4 Standard. |
Matches |
48222 | 48222-1746 |
Non-Matches |
4632 | Blake | 37333-32 |
Author |
Rating:
Blake Facey
|
Title |
Test
Details
Pattern Title
|
Expression |
^(\d{5}-\d{4}|\d{5})$|^([a-zA-Z]\d[a-zA-Z] \d[a-zA-Z]\d)$ |
Description |
This is a modification of the zip code regular expression submitted by Steven Smith ( [email protected])
It no longer matches 78754-12aA |
Matches |
78754 | 78754-1234 | G3H 6A3 |
Non-Matches |
78754-12aA | 7875A | g3h6a3 |
Author |
Rating:
Khoi Pham
|
Title |
Test
Details
Pattern Title
|
Expression |
^[a-zA-Z][0-9][a-zA-Z]\s?[0-9][a-zA-Z][0-9]$ |
Description |
Match Canadia Zip Code. You can have a space in the middle Like T2P 3C7, or no space like T2P3C7 |
Matches |
T2p 3c7 | T3P3c7 | T2P 3C7 |
Non-Matches |
123456 | 3C7T2P | 11T21RWW |
Author |
Rating:
Qing Jiang
|
Title |
Test
Details
Pattern Title
|
Expression |
^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$ |
Description |
This expression matches three different formats of postal codes: 5 digit US ZIP code, 5 digit US ZIP code + 4, and 6 digit alphanumeric Canadian Postal Code. The first one must be 5 numeric digits. The ZIP+4 must be 5 numeric digits, a hyphen, and then 4 numeric digits. The Canadian postal code must be of the form ANA NAN where A is any uppercase alphabetic character and N is a numeric digit from 0 to 9. |
Matches |
44240 | 44240-5555 | T2P 3C7 |
Non-Matches |
44240ddd | t44240-55 | t2p3c7 |
Author |
Rating:
Qing Jiang
|
Title |
Test
Details
Pattern Title
|
Expression |
^([A-HJ-TP-Z]{1}\d{4}[A-Z]{3}|[a-z]{1}\d{4}[a-hj-tp-z]{3})$ |
Description |
Codigos Postales Argentinos (CPA)
This expression defines the new zip code format for Argentina. |
Matches |
C1406HHA | A4126AAB | c1406hha |
Non-Matches |
c1406HHA | 4126 | C1406hha |
Author |
Rating:
Not yet rated.
Gabriel Garcia
|
Title |
Test
Details
Pattern Title
|
Expression |
^(?(^00000(|-0000))|(\d{5}(|-\d{4})))$ |
Description |
US zip code expression that disallows 00000 or 00000-0000 for either ZIP or ZIP+4. Great for web site validation. |
Matches |
12345 | 12345-6789 |
Non-Matches |
00000 | 00000-0000 | a4650-465s |
Author |
Rating:
Paul Duncan
|
Title |
Test
Details
Pattern Title
|
Expression |
^(\d{5}((|-)-\d{4})?)|([A-Za-z]\d[A-Za-z][\s\.\-]?(|-)\d[A-Za-z]\d)|[A-Za-z]{1,2}\d{1,2}[A-Za-z]? \d[A-Za-z]{2}$ |
Description |
Allows Canadian, American and UK postal/zip codes. Allowing hyphens, periods, or spaces to separate. |
Matches |
N9B.1Y8 | 90210-1234 | NE21 6EQ |
Non-Matches |
NN8 Y83 |
Author |
Rating:
Russell Anderson
|
Title |
Test
Details
Pattern Title
|
Expression |
^[0-9]{5}([\s-]{1}[0-9]{4})?$ |
Description |
My first Expression. This will match US postal codes (zip codes) using simple 5 digit format with optional 4 digit extention seperated by a space or hyphen. Will not accept letters.
example: 12345 or 12345-1234 or 12345 1234. |
Matches |
12345-1234 | 12345 | 12345 1234 |
Non-Matches |
123451234 | 12345 a345 | a2345-1234 |
Author |
Rating:
Not yet rated.
Ed Stafford
|
Title |
Test
Details
Pattern Title
|
Expression |
^[0-9]{5}([- /]?[0-9]{4})?$ |
Description |
US Zip Code + 4 digit extension Postal Code |
Matches |
14467 | 144679554 | 14467-9554 |
Non-Matches |
14467 955 | 14467- | 1446-9554 |
Author |
Rating:
Chris Weidert
|
Title |
Test
Details
Pattern Title
|
Expression |
((^\d{5}$)|(^\d{8}$))|(^\d{5}-\d{3}$) |
Description |
Brazilia ZIP Code validation! |
Matches |
70235 | 70235-120 | 70235125 |
Non-Matches |
70.235 | 70.235.000 | 70.235000 |
Author |
Rating:
Not yet rated.
Ruben Zevallos
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d{5}(-\d{4})?$ |
Description |
Zip+4 Zipcode RegEx. You may ommit the +4 digits but you must also then ommit the hyphen/dash as well. In 1983, the Postal Service™ began using an expanded ZIP Code™ number called called the "ZIP+4®" Code. The nine digits of a ZIP+4 code (e.g., 12345-6789) is broken down as follows: [123]Sectional Center or Large City. [45]Post Office™ facility or Delivery Area. [-]Required "dash" or "hyphen". [67]Sector or Several Blocks. [89]Segment or One Side of a Street. Also just FYI, ZIP codes in the northeast US frequently start with '0' or '00'. [00988-Carolina, PR] [03110-Bedford, NH]. Thanks, Ryan v- |
Matches |
98121 | 00988 | 12345-6789 |
Non-Matches |
98121- | 12345-678 | 1234 |
Author |
Rating:
Ryan Van Aken
|
Title |
Test
Details
Pattern Title
|
Expression |
^(?<CountryPrefix>DK-)?(?<ZipCode>[0-9]{4})$ |
Description |
This pattern matches danish zip codes with optional country identification |
Matches |
4760 | DK-4700 |
Non-Matches |
DK4720 | DE-4000 |
Author |
Rating:
Not yet rated.
Benny Tordrup
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d{5}((-|\s)?\d{4})?$ |
Description |
Single field zip code validator, useful for Web Forms. Allows user to enter 5-digit or 5-digit plus 4 zip code, with hyphen or space or NO space between last 4 digits. |
Matches |
92078-4705 | 920784705 | 92078 4705 |
Non-Matches |
9027x | 902 | 92078.4705 |
Author |
Rating:
MARK J KRISBURG
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d{5}((\-|\s)?\d{4})?$ |
Description |
Single field zip code validator useful for web forms, where user may enter 5 digit or 9 digit zip code, and may use hyphen, space, or no space between the first 5 digits and last 4 digits. |
Matches |
92078 | 92078-4705 | 92078 4705 |
Non-Matches |
920781 | 920a87 | 920 |
Author |
Rating:
Not yet rated.
MARK J KRISBURG
|
Title |
Test
Details
Validate US Postal Code
|
Expression |
^(?!00000)(?<zip>(?<zip5>\d{5})(?:[ -](?=\d))?(?<zip4>\d{4})?)$ |
Description |
Validate US zip codes. Matches all zip codes of exactly 5 digits except 00000. Optionally, matches zip5+zip4 where zip5 is exactly 5 digits, zip4 is exactly 4 digits, and zip5 and zip4 are, optionally, separated by a single space or hyphen. Captures zip5 and zip4 to named groups to facilitate program manipulation. |
Matches |
12345 | 123456789 | 12345-6789 |
Non-Matches |
12345- | 00000 | 00000-6789 |
Author |
Rating:
Not yet rated.
Jerry Schmersahl
|
Displaying page
of
pages;
Items to