Replace Both Double and Single Quotes in Javascript String

前端 未结 4 1306
醉话见心
醉话见心 2020-12-25 10:10

I am pulling in some information from a database that contains dimensions with both \' and \" to denote feet and inches. Those characters being in my string cause me proble

4条回答
  •  滥情空心
    2020-12-25 10:48

    You don't escape quotes in regular expressions

    this.Vals.replace(/["']/g, "")
    

提交回复
热议问题