$('.am-cat-icon').html( function(i,html) { return html.replace(/(\s"?[A-ZА-ЯЁ][\S\s"]+$)/, '<span style="color: red; ">$1</span>') ; })