我有一个这样的字符串
string = '/location/start:2015-06-06/end:2015-06-06'我将替换为start和end参数。因此,我想使用Regexp删除所有像start:2015-06-06和end:2015-06-06这样的东西。
但我不知道该怎么做。
发布于 2015-07-10 02:04:17
string = string.replace(/start:[\d-]*/g,"").replace(/end:[\d-]*/g,"");https://stackoverflow.com/questions/31324905
复制相似问题