Without seeing a sample of the html you are attempting to parse, my suggestions are a bit more limited, but off of the top of my head, you could consider the following. If your lists are stored in regular html structures (dropdown boxes, html lists etc) you could tokenise the tags (the <option> and </option> tags in a select box for example) and extract the strings between the two tokens for storage in your
Java data structure. Or, alternatively, you could write a utility class that searches for common identifiers in a list , the likes of which you gave examples of, using the String.indexOf() method to search for opening and closing brackets, and then extracting the rest of the
string from that point onwards for storage.
Hope this helps.