I want to use this function but preserving the uppercase or lowercase so for example having something like
var value = 'Replace a string';
var search = 'replace';
value.replace(search, "<span style='font-weight: bold'>"+search+'<span>');
And the output of value be:
Replace a string