Start a new topic

RegEx to Format and Abbreviate Street Names

Here is a large set of regular expressions designed to replace a street name with its standardized USPS abbreviation. (See the "Street Suffixes" and "Secondary Units" tabs). It takes an address such as "15800 Countrydrive Avenue blvd., apt. 1506" and formats it to "15800 Countrydrive Ave Blvd Apt 1506". This isn't perfect as it mistakes an intended part of the street name as an abbreviation. Hence "Avenue" becomes "Ave" and some of the meaning is lost. However if the street name includes a possible abbreviation (such as "Countrydrive") then the abbreviation is appropriately NOT applied.
Regular Expressions - Street Suffixes & Secondary Unit Designators.xlsx (UPDATED BY A LATER POST)

The list includes 202 Street Suffixes and 24 Secondary Unit Designators. The "Use Regular Expressions" check box must be painstakingly ticked for each item. The form needs a "Check All" button or link.

image


There are two regular expressions that should also be included, BLANK and PO Box. They are:

1. BLANK --> , AND \. (two match-on entries)
2. PO Box --> (?i)\b((P\.O\.)|(P\. O\.)|(PO BOX)|(POBOX)|(BOX)|(POB)|(P O BOX))\b

Hopefully someone can modify the regular expression format to restrict alterations to only the last word before the Secondary Unit Designator. That would be helpful.

1 person has this question

I have tried downloading the files, but it keeps saying the file has moved or no longer exists.  


I used IOM at a previous job, and were it not for these dictionaries, I would have been lost. 


Does anyone still have a copy they are willing to share or a link to where the files are now?


Thank you!

Hi Mark,


There are a few different versions of this dictionary floating around, but the attached one is what I typically use on my implementations.


Thanks,


John

xlsx

2 people like this

I wanted to download the Address Abbreviations (Long) version but the link is not working. Any chance someone could provide me with a copy?

Hi Lei-an, here you go!

xlsx

1 person likes this

Thank you so much, Jennifer :)

Does anyone have the Abbreviations spreadsheets available? The links are no longer working.


Thanks so much!

Login or Signup to post a comment