Currently the REGEX that formats the currency string is hard coded in
There are cases where the default format mask has to be overridden. For example, In India, the currency units are different than the international units. And so is the currency formatting. See the table below
In the USA
One Hundred Thousand (100,000)
One Lakh (1,00,000)
Ten Lakhs (10,00,000)
Ten Millions (10,000,000)
One Crore (1,00,00,000)
As you can notice, number formatting changes a bit. Initial grouping of digits starts with 3 digits (R to L), thereafter grouping is of 2 digits.
`I would like to remove the hard coded DELIMIT_REGEX and instead make it an optional attribute that can be passed from locale file.
I have made the code changes and added a test case too. See Pull Request `#21394