<script>
var str="http://community.csdn.net/Expert/PostNew.asp?room=304"
var re=/(?:http\:\/\/)([^/]*)/g;
re.test(str)
alert(RegExp.$1);
</script>