title: Why this javascript regex doesn't work?
body: <p>I'm doing a small javascript method, which receive a list of point, and I've to read those points to create a Polygon in a google map.</p>
  
  <p>I receive those point on the form:</p>
  
  <p>(lat, long), (lat, long),(lat, long)</p>
  
  <p>So I've done the following regex:</p>
  
  <pre><code>\(\s*([0-9.-]+)\s*,\s([0-9.-]+)\s*\)
  </code></pre>
  
  <p>I've tested it with <a href="http://regexpal.com/" rel="noreferrer">RegexPal</a> and the exact data I receive:</p>
  
  <pre><code>(25.774252, -80.190262),(18.466465, -66.118292),(32.321384, -64.75737),(25.774252, -80.190262)
  </code></pre>
  
  <p>and it works, so why when I've this code in my javascript, I receive null in the result?</p>
  
  <pre><code>var polygons="(25.774252, -80.190262),(18.466465, -66.118292),(32.321384, -64.75737),(25.774252, -80.190262)";
  var reg = new RegExp("/\(\s*([0-9.-]+)\s*,\s([0-9.-]+)\s*\)/g");
  var result = polygons.match(reg);
  </code></pre>
  
  <p>I've no javascript error when executing(with debug mode of google chrome). This code is hosted in a javascript function which is in a included JS file. This method is called in the OnLoad method.</p>
  
  <p>I've searched a lot, but I can't find why this isn't working. Thank you very much!</p>