You could try splitting the strings at specific location (ie. "[ ]" ).

See: Split a string using String.split() - Real's Java How-to
and String (Java 2 Platform SE v1.4.2)