remove non letters from string js 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: how to remove lasr char from string in javascript
str=str.slice(0, -1);