JSFiddle - React, Tailwind, and code Playground
HTML
<p>This is some text*</p>
<p>This is some more* text</p>
CSS
.red { color: red; }
JavaScript
console.log($("body :contains('*')"));
$("body :contains('*')").html(function() {
return $(this).html().replace('*', '<span class="red">*</span>');
});