I have a javascript variable that contains the contents of a HTML page. I would like to remove a inline <style type="text/css"> ... </style>
from this. I asked before and it was suggested that I add this to the DOM.
Is there a simpler way that I could remove this using a regular expression. I need to match <style>
as a start and </style>
as a finish. I heard about regex but not even sure if this can be used with javascript.