JSFiddle - React, Tailwind, and code Playground
HTML
<div class="left">6 item(s) - Page 1 of 3</div>
CSS
span {
color: red;
}
JavaScript
$(".left").html(function(i,v){
return v.replace( /(\d+)/g, "<span>$1</span>" );
});
<div class="left">6 item(s) - Page 1 of 3</div>
span {
color: red;
}
$(".left").html(function(i,v){
return v.replace( /(\d+)/g, "<span>$1</span>" );
});