Field Formulas: Replace Non-Numerics, Non-Commas

Options

Is the below REGEX correct to replace all non-numeric, non-comma characters in a string? Seems to be the case, but want to be certain before I provide the solution:

result = fields['amount'].replace(/[^0-9,]/g,'')

As background, this is needed until we have international support for decimals: https://community.pushbot.com/discussion/552/international-number-formats-for-decimals

Tagged:

Best Answer