[P.S.] -- previously forgot to add this link, which makes the whole post stupid otherwise.
http://www.relatebase.com/development/misc/parse_address.php
OK, here's number two, before I put a phone # parser on this forum for general use, wanting feedback and error checking. This feature is an address parser.
I haven't found anything like this out there. Additionally, there's a right and wrong strategy to reading an address and I'm not sure I've thought through all the angles here. But by strength is regex, and if anyone has any constructive contributions or changes, MAKE THEM and put a link on this thread.
I suppose I should (or someone should) look at the Post Office's standard for addressing. But realize that this function should eventually be "intelligent" so that if it's written:
125 S. Park St.
we know the parse is no doubt:
number:125
prefix-direction:S
nameark
type:St (Street)
Whereas
125 South Park Street
should be flagged so you'd also be aware of:
prefix-direction: (none)
name:South Park
type:St (Street)
--OR--
prefix-direction: S
name: Park Street
typenone)