<script> var link="http://www.ubooo.com/test/123.html"; var rtn=link.match(/\d+/); alert(rtn); </script>
<script> var link="http://www.ubooo.com/test/123.html"; var rtn=link.substring(link.lastIndexOf("/")+1); rtn=rtn.match(/[^_.]+/); alert(rtn); </script>
var str=["http://www.ubooo.com/test/123.html","http://www.ubooo.com/test/123_2.html"];document.write((str[0].match(/.*\/(\d+)\.\w+/)||[0,""])[1]); document.write("<br/>"); document.write((str[1].match(/.*\/([\d_]+)\.\w+/)||[0,""])[1]); document.write("<br/>"); document.write((str[1].match(/.*\/(\d+)\_\d+\.\w+/)||[0,""])[1]);
var link="http://www.ubooo.com/test/123.html";
var rtn=link.match(/\d+/);
alert(rtn);
</script>
var link="http://www.ubooo.com/test/123.html";
var rtn=link.substring(link.lastIndexOf("/")+1);
rtn=rtn.match(/[^_.]+/);
alert(rtn);
</script>
document.write("<br/>");
document.write((str[1].match(/.*\/([\d_]+)\.\w+/)||[0,""])[1]);
document.write("<br/>");
document.write((str[1].match(/.*\/(\d+)\_\d+\.\w+/)||[0,""])[1]);