How can we remove dollar sign ($) and all comma(,) from same string? Would it be better to avoid regex?
String liveprice = \"$123,456.78\";
In my case, @Prabhakaran's answer did not work, someone can try this.
String salary = employee.getEmpSalary().replaceAll("[^\\d.]", ""); Float empSalary = Float.parseFloat(salary);