Java menghapus karakter dari string kecuali angka
String str = "a12.334tyz.78x";
str = str.replaceAll("[^\\d.]", "");
Dull Dove
String str = "a12.334tyz.78x";
str = str.replaceAll("[^\\d.]", "");