JAVA/JAVA

문자에서 숫자만 추출

lovineff 2021. 3. 9. 17:13

 

public static String toOnlyNumStr(String str){
    return str.replaceAll("[^0-9]","");
}