I am working on an application where I am presented a string that has some information, its always in the same order, but not always the same length with no special separators, here is an example
"May 30 10:08 am ARRIVAL AT UNIT WILMINGTON DE 19850"
I need to be able to take these string and separate them into 3 parts
Time = "May 30 10:08 am";
Status = "ARRIVAL AT UNIT";
Location = "WILMINGTON DE 19850";
the location will always be a city but might have a space in it like "SAN JOSE"
this is for a package tracking application, I hit a snag on this, just not sure how I should do it, or how even to do it.
I could loop through all the months and call contains, if its found, save it and remove it from the string. the get the next 12 characters and append it to month and have the time. I'm not sure if that's the best practice, but then I have no idea how to separate the status from the location.
ideas friends?