I have string variable, and I want to get the words inside the brackets. Then, I want to store the words inside the bracket into another variable. Last I want to free the first string variable from the words inside the bracket.
Here is an Example:
String a = "nemenin yang ngebet sangat ingin belanja [Mon Sep 22 13:46:19 ICT 2014]";
I want the output become like this:
String b = "nemenin yang ngebet sangat ingin belanja";
String c = "[Mon Sep 22 13:46:19 ICT 2014]";
How can I do that?