I have a String which contains formatted currency values like 45,890.00
and multiple values seperated by comma like 45,890.00,12,345.00,23,765.34,56,908.5
In all of the above solutions, it takes care if all values in the string are decimal values with a comma. What if the currency value string looks like this:
String str = "1,123.67aed,34,234.000usd,1234euro";
Here not all values are decimals. There should be a way to decide if the currency is in decimal or integer.