title: Parse out all long/lat from a string
body: <p>Hi i am trying to get each longitude and latitude that arrives in this format:</p>
  
  <pre><code>(52.99315484540412, -1.179145092694469)(52.99315323095451, -1.1786797294303852)(52.993042641012025, -1.1789238104507405)(52.99308461678997, -1.1791705736801106)
  </code></pre>
  
  <p>I wish to store them in these strings <code>tmpLon1 tmpLat1 tmpLon2 tmpLat2 tmpLon3 tmpLat3 tmpLon4 tmpLat4</code></p>
  
  <p>So far i have done this coding but it fails to work, any body have a better method and could code up an example please ?</p>
  
  <pre><code>//(52.99315484540412, -1.179145092694469)(52.99315323095451, -1.1786797294303852)(52.993042641012025, -1.1789238104507405)(52.99308461678997, -1.1791705736801106)
  
  //Remove all the shit
  longlat = (longlat.replace(/\(/g,""));
  longlat = (longlat.replace(/\)/g,"|"));
  longlat = (longlat.replace(/\ /g,""));
  
  //52.99315484540412,-1.179145092694469|52.99315323095451, -1.1786797294303852|52.993042641012025, -1.1789238104507405|52.99308461678997, -1.1791705736801106|
  
  //Now split out each long lat
  tmpLon1 = longlat.split(",","1"); //ok
  tmpLat1 = longlat.replace(tmpLon1 + ",","");
  tmpLon2 = tmpLat1;
  tmpLat1 = tmpLat1.split("|","1"); //ok
  tmpLon2 = tmpLon2.split("|","2");
  tmpLon2 = tmpLon2.replace(tmpLat1,"");
  
  tmpLat2 = longlat.split(",","4");
  
  tmpLon3 = "";
  tmpLat3 = "";
  
  tmpLon4 = "";
  tmpLat4 = "";   
  </code></pre>