android studio reg get float from numeric string code example
Example: android studio reg get float from numeric string
float f = Float.valueOf("25.5sp.".replaceAll("[^\\d.]+|\\.(?!\\d)", ""));
// f = 25.5
float f = Float.valueOf("25.5sp.".replaceAll("[^\\d.]+|\\.(?!\\d)", ""));
// f = 25.5