Android Studio Reg Get Float z łańcucha numerycznego
float f = Float.valueOf("25.5sp.".replaceAll("[^\\d.]+|\\.(?!\\d)", ""));
// f = 25.5
Jittery Jackal
float f = Float.valueOf("25.5sp.".replaceAll("[^\\d.]+|\\.(?!\\d)", ""));
// f = 25.5