JSFiddle - React, Tailwind, and code Playground
by huppen
HTML
<div class="ce_text">
<p>1234 example <a href="http://www.abc.de/123/def" target="_blank">www.abc.de/123/def</a> goes on 567.</p>
<a href="http://www.999.com">Link 999</a>
<p>1234 example <a href="http://www.abc.de/123/def" target="_blank">www.abc.de/123/def</a> goes on 567.</p>
</div>
CSS
body {
font-family: Times;
color: black;
}
.number {
font-family: Tahoma;
color: red;
}
JavaScript
$(".ce_text p").contents().filter(function(){
return this.nodeType == 3;
}).each(function(i, v) {
$(this).replaceWith(function(){
return this.nodeValue.replace(/(\d+)/g, '<span class="number">$1</span>')
});
});