I have three type of string and i want to format that string to get street number, street name, city name.
The first type is : 34 Ellis Street, San Francisco
Here i want to make it like
street number : 34
street name : Ellis Street
city name : San Francisco
The second type is : 4FL, 800 Market Street, San Francisco
Here i want to delete 4FL,
And i want to make it like
street number : 800
street name : Market Street
city name : San Francisco
The third type is : Ellis & Market, San Francisco
Here i want to make it like
street number :
street name : Ellis & Market
city name : San Francisco
How can i do this or any link that show string formatting like this than please suggest.And yes the string i write here is just a format of string i get,string will be changed every time.
The address string is passed to this method and then it is converted into an array having 3 string objects containing streetNumber, streetName and cityName. Then the array is returned to the caller.