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, '');
.replace ('\'', '');
But it seem like the ‘ does now want to be deleted…
I am thinking that the ‘ maybe encoded utf-8 or something
Any ideas
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.