I need to remove trailing decimal/dot from a statement. Following is the statement
ABC paid 10.25 RS confirmed. from bank XYZ 20125722. on 23-12-2012
I want to remove the trailing decimals/dot from the statement. After removed the decimal/dot, it should be like
ABC paid 10.25 RS confirmed from bank XYZ 20125722 on 23-12-2012
Please note, I don’t need to remove the decimal in the 10.25, but in other places. How can I do it with Java?
In Java, just use replaceAll(String pattern,String replacement) method on a string, like below: