String str = "01-abc123-한글1234";
String restr = str.replaceAll("[^0-9]","");
System.out.println(str + " ==> " + restr);
반응형
String str = "01-abc123-한글1234";
String restr = str.replaceAll("[^0-9]","");
System.out.println(str + " ==> " + restr);