Remove <style> tags globally using Regex in JavaScript -
how can use regex in javascript remove <style>
, <style type="text/css">
, </style>
, <style type="text/css"/>
. final result css without style tags.
for reason code below doesn't work.
str.replace(/<style\b[^<]*(?:(?!<\/style)<[^<]*)*<\/style>/gi,'');
wiki
Comments
Post a Comment