Как разобрать произвольную улицу / почтовый адрес из текста и по компонентам

Мы ведем бизнес в основном в Соединенных Штатах и пытаемся улучшить взаимодействие с пользователем, объединив все поля адреса в одну текстовую область. Но есть несколько проблем:

The address the user types may not be correct or in a standard format The address must be separated into parts (street, city, state, etc.) to process credit card payments Users may enter more than just their address (like their name or company with it) Google can do this but the Terms of Service and query limits are prohibitive, especially on a tight budget

Видимо, это общий вопрос:

PHP script to parse address? How do I parse the free format address to save into the DataBase java postal address parser More efficient way to extract address components How can i show a pre populated postal address in contacts screen with street, city, zip on android PHP regexp US address

Есть ли способ изолировать адрес от текста вокруг него и разбить его на куски? Есть ли регулярное выражение для разбора адресов?

Ответы на вопрос(7)

Ваш ответ на вопрос