manraj82
manraj82

Reputation: 6325

How do you remove unicode characters in javascript?

Im trying to remove some unicode characters[E000-F8FF] from a string.How do I go about doing this in javascript? For example I looking to strip E018 from this string :

The IT Crowd 

Upvotes: 7

Views: 19252

Answers (1)

Fabrizio Calderan
Fabrizio Calderan

Reputation: 123428

str = str.replace(/[\uE000-\uF8FF]/g, '');

Screenshot taken from firebug:

enter image description here

Upvotes: 25

Related Questions