标签:
function getFileName(str){ var reg = /[^\\\/]*[\\\/]+/g; //xxx\或者是xxx/ str = str.replace(reg,‘‘); return str; } var str2 = ‘user/550bbc9e0ad08fac0b39c147/3706934783.mp3‘; getFileName(str2)
标签:
原文地址:http://www.cnblogs.com/ElvinLong/p/4453005.html