I'd like to turn a string such as abbbbcc
into an array like this: [a,bbbb,cc]
in C#. I have tried the regex from this Java question like so:
var test = "aabbbbcc";
var split = new Regex("(?<=(.))(?!\\1)").Split(test);
but this results in the sequence [a,a,bbbb,b,cc,c]
for me. How can I achieve the same result in C#?