In Java, by default, the regular expression (regex) matching is case sensitive. To enable the regex case insensitive matching, add (?) prefix or enable the case insensitive flag directly in the Pattern. compile() .7 Eyl 2013
Read moreIs Java regex case-insensitive?
Java Regular Expressions are case-sensitive by default .9 Mar 2021
Read moreHow do you write a case-insensitive in regex?
If you want only part of the regex to be case insensitive (as my original answer presumed), then you have two options:
Read more