I am trying to find a piece of regex to remove a currency format.

I have two types of currency values. One is in USD format like 1,000.00 and other is in EUR like 1.000,00. I need to save the value in to db by removing both comma and dot like 1000.00

For example if the user enter the value in USD like 2,222.65, it need to replace to 2222.65,

if the user enter the value in EUR like 2.222,65 it also need to replace to 2222.65,