Smart String Replacements
<p>This works well for case insensitive replacements:</p>

<pre><code>str = str.replace(new RegExp(phrase, 'gi'), '&lt;span style="color:red;"&gt;' + phrase + '&lt;/span&gt;');
</code></pre>

<p>But what I do want is to not change case when replaced which above-mentioned does. </p>
