I am currently working on when a user input a string, then my program will return the search result based on the inputted string. (In this example is "ca")
In the code below, I am only manage to make my program to return all the results which contains lowercase "ca" only.
However, I would like to convert "ca" to all Upper Case while still performing "contains" Regex when returning the search result. Which means, no matter the case is "ca" or "CA", all the results which conatins "CA" will be returned.
May I know how should I modify the code below? Thanks in advance.
public boolean matches( courseList p )
{
return p.getName().contains("ca");
}