On Dec 3, 8:15 pm, Benjamin Stein <[EMAIL PROTECTED]> wrote:
>
> I'm not sure how to standardize this. The XML responses are below.
One way of standardising is to test for a space in the string. If it
is, you've got a reference like "N Carolina"; if it isn't, you've got
"NC". If you have a space, take the first letter of the string and the
letter after the space.
Suppose "state" is the variable containing AdministrativeAreaName:
var re=new RegExp("([A-Z]).*\s([A-Z]).*");
state=state.replace(re,"$1$2");
That's not tested very extensively though.
Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---