js代码:
'baidu("http://baidu.com/love/20170919/a1b2c3/a2b3_c6_ac.co") 2: baidu("http://baidu.com/love/20180818/b2c4e6/a9f6_kd_24.pn") 3: baidu("……同上固定模式………/20160616/v2b3n6/h6gjs_x6_3d.js")'.match(/[^\(\)]+(?=\))/g)
这样是带引号的,去引号的话用:
.match(/[^\("\)]+(?="\))/g)
var reg=/baidu\(.*((\/.*){3})\"\)/;
var str='baidu("……同上固定模式………/20160616/v2b3n6/h6gjs_x6_3d.js")';
str.replace(reg,"$1");
baidu\(("[^"\)]+")\)
取分组1($1)