我要替换一个字符串中含有 {} 的内容
url = /api/shop/delete/{id};
//替换成/api/shop/delete/10;
newUrl = url.replace(/^\{\S+\}$/g,10);
结果替换不成功
慕尼黑8549860
相关分类