title: Javascript regex. Need to extract value from a SVG string
body: <p>I have SVG string and I need to extract its two attributes: width and height.</p>
  
  <p>I can't use some XML parser since I am using this with Titanium Studio framework so I don't have DOM anywhere.</p>
  
  <p>SVG's looks like this:</p>
  
  <pre><code>&lt;svg xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" version="1.1" width="768" height="1005" space="preserve"&gt;
      LOT OF DATA HERE... &lt;&gt;&lt;/&gt; etc
  &lt;/svg&gt;
  </code></pre>
  
  <p>I started with something like this:</p>
  
  <pre><code>var width = svgString.match( /^&lt;svg.\width.=.(.*)$&gt;/gm );
  </code></pre>
  
  <p>It's 4 AM and my brain is just not working.
  If someone could help it would be great! Thx.</p>