javascript method to take the number from a string and ignore letters code example
Example 1: javascript remove non numeric chars from string keep dot
var s = "-12345.50 €".replace(/[^\d.-]/g, ''); // gives "-12345.50"
Example 2: jquery extract number from string
var id_of_div = "div_id_12";
var id_number = parseInt(id_of_div.replace(/[^0-9.]/g, ""));
console.log(id_number);//12