Java usuwa liczby nie
String str = "a12.334tyz.78x";
str = str.replaceAll("[^\\d.]", "");
Dull Dove
String str = "a12.334tyz.78x";
str = str.replaceAll("[^\\d.]", "");