Android replace strings doesnt work : <p>in this below String arrays i have this tags:</p>

<pre><code>String[] tags = {
        "&lt;mft:A&gt;",
        "&lt;mft:S&gt;",
        "&lt;mft:R&gt;",
        "&lt;/mft:A&gt;",
        "&lt;/mft:S&gt;",
        "&lt;/mft:R&gt;"
};
</code></pre>

<p>and i want to replace them with this <code>html</code> tags:</p>

<pre><code>String[] replacementHtmlTags = {
        "&lt;font color=\"red\"&gt;",
        "&lt;font color=\"green\"&gt;",
        "&lt;font color=\"blue\"&gt;",
        "&lt;/font&gt;",
        "&lt;/font&gt;",
        "&lt;/font&gt;"
};
</code></pre>

<p>now after define targets and replacements my code doesn't work:</p>

<pre><code>String rawParagraph = "11111 &lt;mft:A&gt;22222&lt;/mft:A&gt; 33333 &lt;mft:S&gt; 44444 &lt;mft:A&gt; 555555 &lt;mft:S&gt; 66666 &lt;/mft:S&gt;&lt;/mft:A&gt;&lt;/mft:S&gt;&lt;mft:R&gt; 77777 &lt;/mft:R&gt;"

for (int tag = 0; tag &lt; tags.length; tag++) {
    rawParagraph.replace(tags[tag], replacementHtmlTags[tag]);
}
</code></pre>
