I have a string ABCD:10,20,,40;1/1;1/2,1/3,1/4 I want to split the string into the following parts:
ABCD -- splited by :
10,20,,40 -- splited by ;
1/1 -- splited by ;
1/2,1/3,1/4 -- splited by ;
Why the following regular expression does not work for me ?
string txt = @"ABCD:10,20,,40;1/1;1/2,1/3,1/4";
Regex reg = new Regex(@"\b(?<test>\w+):(?<com>\w+);(?<p1>\w+);(?<p2>\w+)");
Match match = reg.Match(txt);