Code:
text[index] == ',' || text[index + 1] == EOS) && parenthesesCounter == 0
This is the expression you're using to determine whether to copy something over into your results. It can only possibly be true when parentheses are balanced. Since your sample input starts with an open parentheses, that means it'll only actually be true at the very end, when the parentheses balance out (and the next character is null for the end of the string).
The code from fysiks doesn't appear to do what you want.