Parenthesis not being replaced in regex

前端 未结 1 1379
情深已故
情深已故 2021-01-28 01:14

I know there are many ways over the internet but this case is a special one.

I need to replace :) with . And

1条回答
  •  被撕碎了的回忆
    2021-01-28 01:26

    You have to escape the parenthesis:

    str.replace(/:\)/g, '');
    

    0 讨论(0)
提交回复
热议问题