I’m trying to remove a pound sign (£) from a string using javascript. I’m trying to do it using
str = str.replace(/\£/g, "");
However, it is not removing the sign.
The value of str is being fetched from a span (and the correct value is being fetched). This span has been previously set using javascript, with it being encoded in the string as
£
Any ideas on the best way to remove the pound sign?
You may need to use unicode for this. E.g.,
'£10.00'.replace(/\u00A3/g, '');