I want to parse a String that i have into a Number. This is the Code that i'm using but not working:
NumberFormat.getCurrencyInstance(Locale.GERMAN).parse("EUR 0,00");
This results in a java.text.ParseException
So i want to match the String into a number, i don't really care about the currency, but it would be nice to have.
I want the following kind of Strings matched:
EUR 0,00
EUR 1.432,89
$0.00
$1,123.42
1,123.42$
1,123.42 USD
Sure, there are ways with RegEx, but i think it would be kind of overkill.
1,000.52
serves a different role than that in1.000,52
? – Abramabramo