I have worked in SOAP message to get LoginToken from Webservice, and store the LoginToken in String and used System.out.println(LoginToken); to print. This prin
System.out.println(LoginToken);
StringUtils's removeStart and removeEnd method help to remove string from start and end of a string.
StringUtils
removeStart
removeEnd
In this case we could also use combination of this two method
String string = "[wdsd34svdf]"; System.out.println(StringUtils.removeStart(StringUtils.removeEnd(string, "]"), "["));