javascript - Better Way to Escape Dollar Signs in the String Used By String.prototype.replace

前端 未结 0 1141
死守一世寂寞
死守一世寂寞 2020-12-19 00:10

I want to replace a string by another. I found when the replaceValue contains \"$\", the replace will fail. So I am trying to escape \"$\" by

相关标签:
回答
  • 消灭零回复
提交回复
热议问题