On 06/06/2012 20:53, Antonio R. de Oliveira wrote:
> I want to remove symbols and text from formatted String when using
> /NumberFormat.getCurrencyFormat().format()/ with internationalization.
>
> Examples after remove:
>
> Currency - Formated = Without
>
> US: US$100.15 = 100.15
> BRL: 100,15R$ = 100,15
> Euro: 100,15� = 100,15
A possible solution:
String data = "US$100.15\n" +
"100,15R$\n" +
"100,15�\n";
String res = data.replaceAll("[^\n\\d,.]+", "");
--
Philippe Lhoste
-- (near) Paris -- France
--
http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --