I am trying to remove the negative and positive decimal value from the string following script remove the positive decimal value from the string however negative is not working
var string = "Test Alpha -0.25 (1-3)"
string = string.replace(/\s*\d+[.,]\d+/g, "");
console.log(string);
above code is returning following output:
Test Alpha - (1-3)
Expected output:
Test Alpha (1-3)
Please help me
-... like/\s*-?\d+etc