title: simplest way to use javaScript to parse SVG path string to extract initial x,y coordinates
body: <pre><code>path[1].innerHTML 
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>  &lt;path d="M 5,10 l0,0 l 15 ,0l0,15l-15,0l0,-15 z" ....
  </code></pre>
  
  <p>The first 2 digits after M are the x,y coordinates for the starting point of the SVG path.</p>
  
  <pre><code>path[1].innerHTML.substr(10,2)
  </code></pre>
  
  <p>returns the x cordinate (5) and</p>
  
  <pre><code>path[1].innerHTML.substr(13,2) 
  </code></pre>
  
  <p>returns the correct y coordinate.
  The problem is the values may be single or double or triple digit numbers which will break the substr() way of doing it.</p>