let htmlTEXT = `<h1>page 1</h1>
<input type="text" spellcheck="false" data-ms-editor="true">
<script src="/static/test.js">
console.log("hello");
console.log("goodbye");
</script>`
// hopeful regex magic to produce the below
// -> /static/test.js
/* ->
console.log("hello");
console.log("goodbye"); */
I have a string which contains HTML, and I would like two regular expressions to get
- the script’s src value
- the script’s content