The following code snippet shows how to use Pattern.CASE_INSENSITIVE in patterns.

Java Code:
Pattern pattern = Pattern.compile("(H[ae]l{2}o){3}",Pattern.CASE_INSENSITIVE);
CharSequence inputStr = "HALloHelloHEllo HelloHelloHello Heeello H_llo Hillo1";
Matcher matcher = pattern.matcher(inputStr);

while(matcher.find())
{
int start = matcher.start();
int end = matcher.end();
System.out.println("Pattern found:  " + inputStr.subSequence(start, end).toString());
}
Output:

Java Code:
Pattern found:  HALloHelloHEllo
Pattern found:  HelloHelloHello