For instance I have this number: 1.000,20 I want to convert it to 1000.20 or just remove everything behind the comma like this: 1000.
How do I achieve this? I did this:
console.log(num3.replace(/\[,.]/g, ''), 'test', num3.replace(/\,/g, ''));
Which results in: 0,00
Here is a Fiddle which console.logs the output on line 18 in the JS: https://jsfiddle.net/kn7ae9e2/1/
".". Is that also desired/intentional? Do you want the final result to be a string or a number? Please be very specific in what you are asking; this is too vague and open to interpretation.num3.replace(/\./g, '').replace(/,/, '.')?