how to split string with square brackets in java