parse float in string in javascript
<p>Say <code>str = 'translate(-100.93,50.88)'</code>, how can I get the two float: <code>-100.93</code> and <code>50.88</code> in JavaScript? I was stuck here for a while. I tried </p>

<pre><code>str.match(/[\-|\+|\d+|\.]/g)
</code></pre>

<p>which gave me single chars.</p>

<p>Thanks</p>
