title: Unterminated group in regexp
body: <p>I try test string using regexp in JavaScript.
  Correct string looking like:</p>
  
  <pre><code>&lt;script charset="utf-8"&gt;new DGWidgetLoader({"width":640,"height":600,"borderColor":"#a3a3a3","pos":{"lat":46.00650100065259,"lon":11.263732910156252,"zoom":9}
  </code></pre>
  
  <p>I want test that "width", "height" looks like xxx or xxxx, and "lat", "lon" 
  looks like x{1,2}.x*, zoom looks like x{1,2}</p>
  
  <p>I try use this regex</p>
  
  <pre><code>/&lt;script charset="utf-8"&gt;new DGWidgetLoader(/{"width":[0-9]{3,4},"height":[0-9]{3,4},"borderColor":"#a3a3a3","pos":\{"lat":[0-9]{1,2}.[0-9]+,"lon":[0-9]{1,2}.[0-9]+,"zoom":[0-9][0-9]}//
  </code></pre>
  
  <p>with String.search(), but got error <code>SyntaxError: Invalid regular expression: /&lt;script charset="utf-8"&gt;new DGWidgetLoader(/{"width":[0-9]{3,4},"height":[0-9]{3,4},"borderColor":"#a3a3a3","pos":{"lat":[0-9]{1,2}.[0-9]+,"lon":[0-9]{1,2}.[0-9]+,"zoom":[0-9][0-9]}//: Unterminated group</code></p>
  
  <p>How can i parse script tag that looking like below?</p>