/Desktop/Web/node/we_expert/static/upload/common/....有这样一个字符串, 我想去掉 static 前面的内容,留下/upload/common/....应该怎么写正则百度答案全部答非所问....
3 回答

大话西游666
TA贡献1817条经验 获得超14个赞
let reg=/\S+static(\S+)/ //正则
let str='/Desktop/Web/node/we_expert/static/upload/common' //要处理的源字符串
console.log(reg.exec(str)[1])

慕尼黑8549860
TA贡献1818条经验 获得超11个赞

慕容708150
TA贡献1831条经验 获得超4个赞
添加回答
举报
0/150
提交
取消