【发布时间】:2016-06-17 10:41:54
【问题描述】:
在下面给出的文件夹引用中,我需要将文件夹引用更改为上一个文件夹。我尝试使用正则表达式。但它不起作用。
var str = "../../myfolder is my folder xxx ../myfolder is also my folder and ../../../myfolder this is too";
预期结果:
str = "../myfolder is my folder xxx myfolder is also my folder and ../../myfolder this is too";
【问题讨论】:
-
str.replace("../", ""),str0.replace("../", ""),str1.replace("../", "") -
哦抱歉忘了说一件事..我现在会正确地改变问题
标签: javascript regex string