I am getting style from backend. it has unwanted prefix with it. i would replace the same without the prefix. what would be the correct way?
style
here is what wh
Here's a solution :
$('style').html(function(_,h){ return h.replace(/^\w+ (\.\w+)/gm,'$1'); });
This removes any string at the start of a line and before a class selector in any element.
Demonstration