Say I have two strings,
String s1 = \"AbBaCca\"; String s2 = \"bac\";
I want to perform a check returning that s2 is contained
s2
One problem with the answer by Dave L. is when s2 contains regex markup such as \d, etc.
\d
You want to call Pattern.quote() on s2:
Pattern.compile(Pattern.quote(s2), Pattern.CASE_INSENSITIVE).matcher(s1).find();