I have a Arraylist, like this:
ArrayList<String> moisturizersPrices = [Price: Rs. 365, Price: Rs. 299, Price: Rs. 12, Price: 220, Price: 95, Price: 216]
for that I am using following logic:
moisturizersPrices.replaceAll("[^0-9.]", "")
and it is returning me something like this:
[.365, .299, .12, 220, 95, 216]
Now I want to remove all characters from there, except for numeric, such as it should be giving me results like this:
[365, 299, 12, 220, 95, 216]
I need to know, where I am making mistake.
You could try a
Patternmatch like