Regex rx = new Regex(@"[+-]"); string[] substrings = rx.Split(expression);
expression = "-9a3dcbh-3bca-4ab4cf-3hc" // This is the iput line I want to split this line between + or -. My VS debugger shows a substring array as follows: substrings [0] = null // ??? substrings [1] = 9a3dcbh substrings [2] = 3bca substrings [3] = 4ab4cf substrings [4] = 3hc
Why is the first element arry null, is it because I match + - and there is no input in my input line?
source share