Java : Replacing String Words
<p>I have a String as "<strong>ISTERC Mini BAT</strong>"</p>

<p>The Problem is that the Word Mini May come in Case sensitive Letters (Mini Or MINI )</p>

<p>The requirement is that , i need to remove the word <strong>Mini/MINI</strong> from the String and it should look like "<strong>ISTERC BAT</strong>" 
(Also removed a extra space before Mini)</p>

<p>I have tried this way </p>

<pre><code>public class Test {

    public static void main(String args[]) {

        String Symbol = "ISTERC Mini BAT";

        if (Symbol.contains("Mini") || Symbol.contains("MINI")) {
            Symbol = Symbol.replace(" Mini", "");
        }

        System.out.println(Symbol);

    }

}
</code></pre>

<p>The question is should i write an another <code>if condition</code>  to handle if contains ("MINI")</p>

<p>Tried this way after responses</p>

<pre><code>public class Test {

    public static void main(String args[]) {

        String Symbol = "ISTERC Mini BAT";

        if (Symbol.contains("(?i)mini")) {

            Symbol = Symbol.replaceAll(" (?i)mini", "");
        }

        System.out.println(Symbol);

    }

}
</code></pre>
