JSFiddle - React, Tailwind, and code Playground
JavaScript
deduct();
function deduct(){
var getamt= "Amount is 1000"; //eg: Amount is 1000
var value1 = 100;
var getamt2 = value1 - getamt.replace( /^\D+/g, '');
console.log(getamt2);
}
deduct();
function deduct(){
var getamt= "Amount is 1000"; //eg: Amount is 1000
var value1 = 100;
var getamt2 = value1 - getamt.replace( /^\D+/g, '');
console.log(getamt2);
}