I'm trying to strip a tag from a document to help my XML parser parse it, but my Regex isn't working. Here's what I have:
stripHead = new RegExp('<HEAD[\s\S]*?\/HEAD>')
doc = doc.replace(stripHead, '')
The relevant part of the doc:
<SAMI>
<HEAD>
<TITLE>TEST_Eclipse_SMI</TITLE>
<SAMIParam>
Media {TEST_Eclipse_SMI.wav}
Metrics {time:ms;}
Spec {MSFT:1.0;}
</SAMIParam> <STYLE TYPE="text/css">
<!--
P { font-family: Arial; font-weight: normal; color: white; background-color: black; text-align: center; }
.ENUSCC { name: English; lang: en-US ; SAMIType: CC ; }
-->
</STYLE>
</HEAD>
<BODY>
Regex101 seems to think this matches fine, but it's not replacing anything.