<script>
var str="ABCD#as124dfgtE";
alert(str.match(/#(\w*\d)*/g).join('').replace(/[^\d]/g,''));
</script>
var str="ABCD#as124dfgtE";
alert(str.match(/#(\w*\d)*/g).join('').replace(/[^\d]/g,''));
</script>
调试欢乐多
str = str.replace(/[^#]*#(.*)/, function(a, b){return b.replace(/\D/g, "")});
alert(str);