I am trying to match two string using following lines
int row = 1;
String index = row + ",(.*)";
String R = "1,2";
Object result = index.equals(R);
The result is false while I want it to be true.I cannot use other method link .matches() and not even the pattern object for the index as i want it to integrate with other method which uses Hashmap .
In the map keys (String) will have indexes link (1,2) , (1,3) , (2,3), ... I want to search them from the first number i.e 1 , 2 and so on.
Thanks in advance.