I want to write a regex expression for Euro currency symbol.
/[x80]/g is not working because the
[...] is a character class matching 1 char from the defined set: either
You need to either use the literal
/€/g), or, in case there are issues with using the literal euro symbol, you should use
var s = "1.500€ - 2.000€"; console.log(s.replace(/\u20AC/g, "EUR"));