Use replaceAll() to ignore case when replacing one substring with another : String Operation « Regular Expressions « Java.
Read moreIs string replace case-sensitive?
The String. Replace() method allows you to easily replace a substring with another substring, or a character with another character, within the contents of a String object. This method is very handy, but it is always case-sensitive .26 Eyl 2012
Read more