I'm trying to parse/split a
String into tokens using the String.split( regex ) method, but I'm losing the empty tokens at the tail of the String. Currently, I'm using:
which creates the following String array:
str[0] = "1"
str[1] = "2"
str[3] = ""
str[4] = "4"
unfortunately, all the empty tokens are lost at the end of the String, but they need to be preserved.
Desired output:
str[0] = "1"
str[1] = "2"
str[3] = ""
str[4] = "4"
str[5] = "";
str[6] = "";
str[7] = "";
any suggestions?
Jamie
[ October 20, 2003: Message edited by: Jamie Robertson ]
[ October 20, 2003: Message edited by: Jamie Robertson ]