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);
It's easy, You need to find index of [ and ] then substring. (Here [ is always at start and ] is at end) ,
String loginToken = "[wdsd34svdf]"; System.out.println( loginToken.substring( 1, loginToken.length() - 1 ) );