I have a string that contains commaand space. I need to split this string based on these two and add it to the string array. Until now, I have done this both comma and space, but not at the same time. Here is the line:
2013/02/05 11: 50: 57.00: 00: 17.5.9870, O, 9851.9851, 1.1029441.0, E9870, Extn9870, E9851, GM PS, 0.0 ,,,,, ,,
As you can see from the above line example 2013/02/05 11:50:57, it contains a space and a remainder, each of which is separated by a comma.
Here is the code I tried.
string[] str = line.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
source
share