Hapus semua karakter hanya nomor JavaScript Code Jawaban

var s = "-12345.50 €".replace(/[^\d.-]/g, ''); // gives "-12345.50"
Matteoweb