Search code examples
phpregexstreet-address

Parse A Steet Address into components


Does anyone have a php class, or regex to parse an address into components? At least, it should break up into these components: street info, state, zip, country


Solution

  • A library/language agnostic solution would be to use Google's geocoder for this. It can return detailed, broken-down information about a given address.

    http://code.google.com/apis/maps/documentation/services.html#Geocoding_Structured