Check out example codes for "java remove non numbers from string". It will help you in understanding the concepts better.
Code Example 1
String str = "a12.334tyz.78x";
str = str.replaceAll("[^\\d.]", "");
Learn ReactJs, React Native from akashmittal.com