JSFiddle - React, Tailwind, and code Playground

by David Thomas

HTML

<span class="price">			 
	<span class="price">
        <span class="amount">£8.75</span>
        –
        <span class="amount">£19.20</span>
    </span>
</span>

JavaScript

$('span.price').each(function(){
    $(this)
        .find('.amount')
        .next()
        .remove()
    .end();
    var c = $(this);
    var t  = c.text();
    var b = t.replace('–', '@');
    c.text(b);
    
});