I have an input string of the following format:
Message:id1:[label1:label2....:labelN]:id2:[label1:label2....:labelM]:id3:[label1:label2....:labelK]...
It is basically ids associated with sets of labels. There can be an arbitrary number of ids and labels associated with those ids.
I want to be able to parse this string and generate a HashMap of the form id->labels for quick look up later.
I was wondering what would be the most efficient way of parsing this message in java?
String#split()should do the trick.