I have a string “bangalore mumbai delhi” etc. I want to write each city into a list/array based on new line seperator
Use : str.Split(" "c).ToList as shown below
I also could do this using Matches…Regex.
used advanced option to configure regular expression