Works perfectly for me. There's code you're not showing us though, var has no purpose, for instance. (It should also have a more descriptive name). Without all the code we can't help you.
–
CrisfoleMar 5 '11 at 18:50

P.S. your comment says you want to pick the index of the result...care to elaborate on your title in the question? (Or change the title?)
–
CrisfoleMar 5 '11 at 18:51

@Sven Marnach The full code is a little more complicated as the string it is that i am trying to split is coming from an arduino mega via a comm port. The string appears to be working fine as i have done tests on it. <p>full code will be added above
–
jklmukMar 5 '11 at 18:59

1

then ins[1] will not work for the first time through. You'll need to skip it.
–
CrisfoleMar 5 '11 at 19:19