Having read the thread again I think the OP should use regular expressions rather than split.