I am able to extract a city from a long string. Sometimes the city is 1 word sometimes multiple. When it is multiple it is written with no spaces (i.e., NewYorkCity) and I need for it to be written with spaces (i.e., New York City).
I know how to split into an array and then i can get the string value from that but I want to be able to put the city in 1 variable regardless if it is one word or multiple.
Here is an example of how the cities output are:
The highlighted ones are multiple name cities.
My assign for City to get to that is this:
City = System.Text.RegularExpressions.Regex.Match(NoLinePDF,“(?<=customerresidingin).+(?=,)”).ToString
City = Split(City,”,”)(0).ToString.Trim
Each word of the city name would be capitalized. Any help would be appreciated.