title: Regex expression for checking if a string contains a valid script tag
body: <p>I am trying to create a regex expression that tests whether a given string has a valid script tag. If for example a page contains within it</p>
  
  <pre><code>&lt;body&gt;Body goes here&lt;/body&gt;
  &lt;script src = "page.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Testing this string (the HTML source of the page in this case) with the regex test method should return true since there is a valid script tag. Similarly a URL with a valid script tag like: </p>
  
  <pre><code>https://url.com/something.php?getp=&lt;script&gt;func();&lt;/script&gt;
  </code></pre>
  
  <p>should also return true. However, something like:</p>
  
  <pre><code>https://url.com/something.php?getp=&lt;script&lt;/script&gt;
  </code></pre>
  
  <p>should return false since it is not a valid script tag.</p>
  
  <p>Any advice on how to go about this would be appreciated. Thanks!</p>