Hello everyone I have field where user can enter dollar amount. I use JQuery mask plugin to format the number. Here is example of the values that user enters in the input field:
30,000.00
7,513.12
100,324.23
90,234,232.34
Before I save the value in database I would like to remove all characters but numbers (period and commas in this case). I use ColdFusion 2018
and function reReplace()
for this purpuse. Here is example of what I have:
reReplace(form.amount, ".\,", "", "all")
The function above will provide these outputs:
30000.00
7513.12
100324.23
90234232.34
As you can see period is still not removed. Is there a way to get rid of everything but numbers?