<script language=javascript>
var str="da*s2*42"
re=/[^1234567890\*]/g
alert(str.replace(re,''));
</script>