JSFiddle - React, Tailwind, and code Playground

by yourbudweiser

HTML

<div class="whatever">
	world wide web
</div>
<div class="whatever">
	world wide web
</div>
<div class="whatever">
	world wide web
</div>
<div class="whatever">
	world wide web
</div>

CSS

span {
  color: red;
}

JavaScript

$('.whatever').each(function() {
  var mystring = $(this).html();
  mystring = mystring.replace(/e/g, "<span>e</span>");
  $('.whatever').html(mystring);
});