In my application I use the javascript replace method with following regex:
replace(/\€/g,'$')
This code find € character and change it to $. But now I want to this code replace € and £ to $ character. How can I do that?
You can use a character class to define one of several characters, as well they dont need to be escaped.
'€ and £'.replace(/[£€]/g, '$'); //=> '$ and $'