toRegex() 함수 사용 fun main() { var testRegex = """[\D]""".toRegex(); println(testRegex.replace("!@#57 -/312\$F 1ASD1326 450 !~","")) var test = "!@#57 -/312\$F 1ASD1326 450 !~"; print(test.replace("[\\D]", "")) } 자바처럼 사용하면 작동이 되지 않는다 regex101.com/r/FIXIWL/1/ Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript Please wait while the app is loading... regex101.com