Android Studio Reg Get Float de String numérico

float f = Float.valueOf("25.5sp.".replaceAll("[^\\d.]+|\\.(?!\\d)", ""));
// f = 25.5
Jittery Jackal