I have this string (Java 1.5):
:alpha;beta:gamma;delta
I need to get an array:
{\":alpha\", \";beta\", \":gamma\", \";delta
To keep the separators, you can use a StringTokenizer:
new StringTokenizer(":alpha;beta:gamma;delta", ":;", true)
That would yield the separators as tokens.
To have them as part of your tokens, you could use String#split with lookahead.
String#split