Having this String with decimal point, I would like to remove all non alphaNumeric expect the decimal point.
String toPharse = "the. book - cost 7.55 dollars.";
String newPharse = toPharse.replaceAll("[^A-Za-zd.0-9 ]", " ").replaceAll("\\s+", " ");
Currently I get "the. book cost 7.55 dollars.";
However I would like to return "the book cost 7.55 dollars";