title: Parse contents of script tags inside string
body: <p>Let's say I have the following string:</p>
  
  <pre><code>var myString = "&lt;p&gt;hello&lt;/p&gt;&lt;script&gt;console.log('hello')&lt;/script&gt;&lt;h1&gt;Test&lt;/h1&gt;&lt;script&gt;console.log('world')&lt;/script&gt;"
  </code></pre>
  
  <p>I would like to use split to get an array with the contents of the script tags. e.g. I want my output to be:</p>
  
  <pre><code>["console.log('hello')", "console.log('world')"]
  </code></pre>
  
  <p>I tried doing <code>myString.split(/[&lt;script&gt;&lt;/script&gt;]/)</code> But did not get the expected output.</p>
  
  <p>Any help is appreciated.</p>