If I got anything wrong or missed an important piece of information, please correct me. It also has a nifty RegEx reference menu and informative interface that keeps you aware of how your changes impact the matches for the sample text you entered. I use this tool frequently when I find RegEx that does something similar to what I need, but could be tailored a bit better.
To match only zip codes in the US 'Zip + 4' format as I needed to do (conditions 2 and 3 only), simply remove the last ? so it will always match the last 5 character group.Ī useful tool I recommend for tinkering with RegEx is linked below: If you want to allow both standard 5 digit and +4 zip codes, this is a great example. …? = The pattern before it is optional (for condition 1) While Americans say zip code, most other countries say post code, postal code, or pin code.I know this may be obvious for most people who use RegEx frequently, but in case any readers are new to RegEx, I thought I should point out an observation I made that was helpful for one of my projects. In New Zealand, post codes consist of four digits. You have to write them after the name of the town, city, or suburb, and the state or territory.
The Canadian postal code consists of six characters, which are alphanumeric.Īustralian post codes consist of four numbers.
Ireland, which has the Eircode, provides a 7-character alphanumerical unique code for each individual address. We can write the term as one word – postcode – or two words – post code.
In the British System, for domestic properties, a single postcode may cover up to one-hundred properties in contiguous proximity. Alphanumeric means it consists of numbers and letters. In the UK, the post office uses a system it calls the ‘ post code,’ which is alphanumeric. The last two digits – 10 – represent the delivery area or associate post office. The next two digits – 83 – represent the Sec Center. ‘Eight’ covers Arizona, Colorado, Idaho, New Mexico, Nevada, Utah, and Wyoming. The first digit – 8 – represents the national area. The sec center subsequently sorts them according to the last two digits, after which they go to local post offices.įor example, let’s look at the zip code 88310. We also call this facility the ‘sec center’ (sectional center facility).Īll letters and parcels with the same first three digits go to the same sec center. The second and third digits determine the central mail processing facility that processes and sorts the mail. The first digit generally represents a group of US states. The US Postal Service has been using a Zip Code system since 1963. There are several ways you can access this information. This US Postal Service web page helps businesses find zip codes. “Twenty years later, the Department implemented an even farther-reaching plan, the Zoning Improvement Plan (ZIP) Code.” “Under this system, delivery units or zones were identified by one or two numbers between the city and state - for example, Birmingham 7, Alabama - so that mail could be separated by employees who did not have detailed scheme knowledge.” To offset the loss, in May 1943 the Post Office Department began a zoning address system in 124 of the largest cities.” “During World War II, thousands of experienced postal employees left to serve with the military. The US Post Office says the following about its zip code system: Businesses can get a discount if they use the 9-digit code. With nine digits, it can carry out a more detailed identification.Įven though the 5-digit zip code is still enough for sending postal items, the 9-digit code is used mainly for businesses.
It subsequently expanded it to nine digits. Originally, the US Post Office used a 5-digit zip code. In Google Sheets, create a spreadsheet with the first 3 columns in this order: ZIPCode, Data, and Color You can use either 5-digit ZIP Codes or 3-digit ZIP Codes (but not a combination of both) Map data will be read from the first sheet tab in your Google Sheet If you dont have a Google Sheet, create one by importing from Excel or a. The zip code is a system the United States Postal Service uses to identify a location and route the mail to that specific location.