I would suggest:
$('#relatedinfo ul li a').html(function(index,html){ return html.replace(/<\/span>(\:)/,''); });
JS Fiddle demo .
Or even:
$('#relatedinfo ul li a').text(function(index,text){ return text.replace(':',''); });
JS Fiddle demo .
An updated approach is to verify that the last character in the span is in the array ['?','!','.'] , And if there is one, then remove : from nextSibling nodeValue:
$('#relatedinfo ul li a span').text(function(index,text){ var lastchar = text.split('').pop(); if (['?','!','.'].indexOf(lastchar) > -1) { this.nextSibling.nodeValue = this.nextSibling.nodeValue.replace(':',''); } });
JS Fiddle demo .
Literature:
David thomas
source share