一个正则表达式实例

< script type = ' text/javascript ' >
   
var str = " http://127.0.0.1:8080/companyWeb/cn_shownews/5.html " ;
    alert((str.match(
/ ([^\\\/]+)\.[^.\\\/]+$ / ) || [, "" ])[ 1 ]);
< / script>


来至

http://topic.csdn.net/u/20080626/23/5f3c18f0-1442-414a-b01a-e217f32f7075.html

你可能感兴趣的:(一个正则表达式实例)