title: JS/Regex - Remove surrounding parenthesis; Center marker (CloudMade Maps)
body: <p>I'm new to programming so the examples that I've seen thus far have been too hard to adopt for my code.  I've got a map with a text box above it that shows the current center coordinates of the map.  The center coordinates are fetched perfectly but there are parenthesis around them for some reason.  I need those parenthesis removed before the form of the input field is submitted.</p>
  
  <pre><code>&lt;div id="coordinates"&gt;&lt;/div&gt;
  
  &lt;div id="map" style="width:750px;height:400px;"&gt;
  &lt;script type="text/javascript" src="http://tile.cloudmade.com/wml/latest/web-maps-lite.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  var cloudmade = new CM.Tiles.CloudMade.Web({key: 'YOUR KEY HERE'});
  var map = new CM.Map('map', cloudmade);
  
  map.setCenter(new CM.LatLng(38.27269,-92.46094), 4);
  var currentLatLng = map.getCenter;
  var myMarkerLatLng = new CM.LatLng(38.27269,-92.46094);
  var myMarker = new CM.Marker(myMarkerLatLng, {title: "Search a 12-mile radius around this marker..."});
  map.addOverlay(myMarker);
  
  CM.Event.addListener(map, 'dragend', function() {
  document.getElementById("coordinates").innerHTML = "&lt;input onclick='cleanString();' type='text' name='lat' value='" + map.getCenter().toString(6) + "' /&gt;";
  });
  
  CM.Event.addListener(map, 'moveend', function() {
  document.getElementById("coordinates").innerHTML = "&lt;input type='text' name='lat' value='" + map.getCenter().toString(6) + "' /&gt;";
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks for any help you can give :)</p>