might be relevant:
http://stackoverflow.com/questions/1116019...into-components
turns out address parsing is not something easy to do, you will find a lot of interesting exceptions along the way that would break whatever magic code you throw at it. If you are not building something at a large scale, you may want to try services provided by google for this (not sure if it exists). Otherwise, may be start collecting some data and do deploy some machine learning to the data to help parsing part of the address.
Address Parser
Nov 12 2015, 04:47 PM
Quote
0.0162sec
1.40
6 queries
GZIP Disabled