I have a string of data like below and I've been struggling trying to figure out how to split it up so that I can use it efficiently.
"United States FirstName: Mike LastName: Doe City: Chicago"
I need to split up the string in to substrings and the list may not always be in the same order.
For example it could vary like below:
"United States City: Chicago FirstName: Mike LastName: Doe"
"CanadaFirstName: Mike City: Chicago LastName: Doe"
I need to find which parameter comes first after 'United States'. It could be 'City:', 'FirstName:' or 'LastName:'. And, I also need to know the start position of the first parameter.
Thanks in advance!