$(".line-numbers").removeClass(function(i, cls) { return (cls.match(/language\-\S+/g)||[]).join(" ") });