I have this string (Java 1.5):
:alpha;beta:gamma;delta
I need to get an array:
{\":alpha\", \";beta\", \":gamma\", \";delta
Assuming that you only have a finite set of seperators before the words in your string (eg ;, : etc) you can use the following technique. (apologies for any syntax errors, but its been a while since I used Java)
String toSplit = ":alpha;beta:gamma;delta "
toSplit = toSplit.replace(":", "~:")
toSplit = toSplit.replace(";", "~;")
//repeat for all you possible seperators
String[] splitStrings = toSplit.split("~")