How can we remove dollar sign ($) and all comma(,) from same string? Would it be better to avoid regex?
String liveprice = \"$123,456.78\";
Just use Replace instead
Replace
String liveprice = "$123,456.78"; String output = liveprice.replace("$", ""); output = output .replace(",", "");