var text = $('.stars').text();
var newText = text.replace(/[^\d\+]/g, '<i class="fa fa-star"></i>');
$('.stars').html(newText);
$('.stars').html(newText); // .text() doesn't neither work