function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
steve_andersensteve_andersen 

Parsing Street Addresses?

I've got a need to break street addresses into their component parts. I start with:

MailingStreet: 2400 NW 63rd St
MailingCity: Seattle
MailingState: WA
MailingPostalCode: 98107

And convert it to this:

StreetNumber: 2400
StreetDirection: NW
StreetName: 63 rd
StreetType: St
City: Seattle
State: WA
Postal Code: 98107

The basic strategy is to regex the patterns. There are some libraries in other languages:

Java (http://jgeocoder.sourceforge.net/parser.html)
Python (http://mail.python.org/pipermail/python-list/2007-June/446215.html)
etc.

Anyone taken this on in Apex and want some help making it work?

Thanks,
Steve