Title |
Test
Find
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
|
Source |
|
Your Rating |
|
Title: an other (shorter) way to write it
Name: Pascal Courtonne
Date: 12/11/2006 11:07:54 AM
Comment:
^\d{5}(-\d{4})?$