I have a value in Javascript as
var input = \"Rs. 6,67,000\"
How can I get only the numerical values ?
Result: 6
6
Try this
var input = "ds. 7,765,000"; var cleantxt = input.replace(/^\D+/g, ''); var output = cleantxt.replace(/\,/g, ""); alert(output);