#MATL, 13 12 bytes
MATL, 13 12 bytes
`jt4Y2m&)hDT
Exits with an error (allowed by default), producing the correct output.
###Explanation
Explanation
` T % infinite loop
j % input one line as a string
t % duplicate
4Y2 % predefined literal: '0123456789'
m % true for elements of string that are digits, false for the rest
&) % two-output indexing: push digits, then non-digits
h % concatenate the two strings
D % display