Hello,
I'm trying to use matches to find a string within a string, but running into trouble using it with a variable. Concatenating the string doesn't seem to be the answer - what is the correct syntax?
Code:
String queryString = request.getQueryString();
for(String value: mvalues ) {
if (value.matches("(?i).*" + queryString + ".*")) {
out.println(value + " is a match!");
}
}