$string =~ s/[^\d]//g;