package seleniumrepo;
public class ExtractNumerics{
public static void main(String[] args) {
ExtractNumerics e=new ExtractNumerics();
e.getInteger("!@#123HHGasd");
}
public void getInteger(String str) {
str=str.replaceAll("[^0-9]", "");
System.out.println(str);
}
}
0 comments:
Post a Comment