I have a string in javascript with some special characters inside.
var string = xxxx † yyyy § zzzz
And I would like to remove those special characters and get only :
string = xxxx yyyy zzzz
I have tryed with this regex:
&#?[a-z0-9]+;
Like that:
string = string.replace(/&#?[a-z0-9]+;/g, "");
But the special characters are not matched with this regex.
Do you please have an idea how can I do it ?
The regex works well, see the example: http://regexr.com?31rrj
It’s working fine for me.
Working example: http://jsfiddle.net/JwrZ6/
It’s probably your syntax, strings have to be defined with ” around them.
NOT