I have some raw strings containing potential currencies in various formats and ISO-codes like
1.000.000 EUR
CHF 4500
5’000’000 USD
600eur
etc.
Is there a proper way to handle these with java.util.Currency without having to write complex regex?
java.util.Currency needs a Locale or currencyCode for the instantiation, however these are not available. I could extract the 3 letter ISO-codes with regex, but then I’d be almost at the same place if I parsed the whole with regex without using any proprietary solutions like java.util.Currency.
1