You can write a negated character class with ^ to include the period, . , and the set of digits, 0-9 : var z = x.replace(/[^0-9.]/g, '');.
確定! 回上一頁