I have some trouble with split string.
My String:
"SG_ PJB_ : 1|10@0+ (0.25,-60) [-60|195.75] "Degrees Celcius" PCM,TCM,AFCM";
I would like to have:
SG_
PJB_
1
10
0+
0.25
-60
-60
195.75
Degrees Celcius
PCM
TCM
AFCM
my Code i have tried:
string s = "SG_ PJB_ : 1|10@0+ (0.25,-60) [-60|195.75] \"Degrees Celcius\" PCM,TCM,AFCM";
string[] res = s.Split(new char[] { ' ', ',', ':', '|', '@', '(', ')', '[', ']', ';' }, StringSplitOptions.RemoveEmptyEntries);
for (int i = 0; i < res.Length; i++)
{
// Console.WriteLine(" ");
Console.WriteLine("{0}", res[i]);
}
Console.ReadKey();
But it splited “Degrees Celcius” in 2 arrays. what should i do?
Use this way: