Regex to remove apostrophe

前端 未结 7 702
野性不改
野性不改 2021-01-22 13:10

I have input text that contains a \' like in this text \"Frank\'s Reel Movie Reviews\"

how do I get rid of the \'

I have tried

.replace (/\\\'/ig         


        
7条回答
  •  Happy的楠姐
    2021-01-22 14:02

    The regex [^\w ] will match anything that is not alphanumeric or space.

    You could use this to ensure all apostrophes/quotes/etc get removed, even if done with Unicode - though there is not enough information in the question to know if this is acceptable.

提交回复
热议问题