ReplaceAll not working

I’m using google volley to retrieve source code from website.Some looping were done to capture the value in the code. I’ve successfully capture the data i wanted but the NumberFormatException: Invalid int: “2,459.00”

The value of the source code is “RM2,459.00 ”
Below are the code i’ve written:

float price = Float.parseFloat(priceString.replaceAll("D+s+", "").trim());

I’ve try to use replaceAll(“,”, “”); to replace the comma and full stop but the log cat will show NumberFormatException: Invalid int: “”

Any idea guys?

Source: android

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.