how to get integer values in a string with js
<pre><code>var text = "rating-1-gray-3-blue";
</code></pre>

<p>i want to get value <code>13</code></p>

<p>how can i do this . basically i want to get all integers inside a string .</p>

<p>i tried with <code>parseInt</code> , but it returns int when the integer value is at the beginning of the string</p>

<p>thanks in advance</p>
