$(':contains("for sale")').each(function(){ $(this).html($(this).html().split("for sale").join("")); });