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