I would like to find same word in two string.
startpoint = newresult.indexOf('\'');
endpoint = newresult.lastIndexOf('\'');
variables = newresult.substring(startpoint, endpoint);
variables = variables.replace("\r\n", ",");
variables = variables.replaceAll("'", "");`
String variables:
cons,john,$,alex,manag;
String second:
ins_manages(john,cons)
As it is seen, both strings they have john and cons and I want to check if both have same char sequences or not but I don't know how it can be checked? Is there any way to check it directly?
Solution:
String [] newvar;
newvar = variables.split(",");
After that, I used a for loop and matched them one by one.
BR