 <p>You can match number with decimals only or numbers with integer and decimal parts:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>for (var x in arr = ["ZAR 200.15", "300.0", "1.02", "29.001", "10"]) { // decimal part only console.log(x, arr[x].match(/(\d+)(\.\d+)?/g)) // integer + decimal part console.log(x, arr[x].match(/(\d+\.\d+)/g)) }</code></pre> </div> </div> </p>