I am trying to split the following strings:
1396*43
23*
56*
122*37*87
All of these are stored in an array. Following is a part of my code:
for(int i=0;i<array.length;i++)
{
String[] tokens = array[i].split("\\*");
System.out.println(tokens[1]);
}
It only prints "43" stored in first index and not "37" stored in last index.