I am trying to remove ® from a string
"My Title with Special Characters My® tag‘
and return
"My Title with Special Characters My tag"
Unicode points to character is ae
, got to know using char.charCodeAt(0)
const regex = /[^A-Za-z0-9]/g;
should remove the same.
2
Answers
If you just want to replace all "®" i would advise not to use regex at all:
if you want to replace all characters that are not ascii characters for example, use something like
/[^ -~]/
where you can list additional characters you want to keep at the end of the character group: /[^ -~äüöÖÄ]/: