日期:2014-05-16 浏览次数:20391 次
var a = 'xxxxx/xxxx/12343432432.wav'
var reg = /\/+([\w]+)\./;
var str = '';
a.match(reg).length > 1 && (str = a.match(reg)[1]);//str即为你要的
var s = "xxxxx\\xxxx\\12343432432.wav";
var a = (/.+\\(.+?)\./.exec(s)
------解决方案--------------------
[,""])[1];
alert(a);