87,995
社区成员
发帖
与我相关
我的任务
分享
var s = 'http://www.xxxx/auto/1\
http://www.xxxx/auto/2/\
http://www.xxxx/auto/3/index.html';
var re = /.+?auto\/([^\/])+?(\/)?/ig;
s.replace(re, function($){
re.test($);
re.lastIndex = 1;
alert( RegExp.$1 )
})