window.ENTITIES={'/api/snippets/javascript/js%20regex%20remove%20currency%20symbol%20from%20string':[{"result":true,"message":null,"batch":{"type":"javascript","name":"js regex remove currency symbol from string","items":[{"id":"DdVP3j","type":"javascript","name":"js regex remove currency symbol from string","content":"const regex = /[$€£]/g; // inside [] define the currency symbols e.g $€£\n\nconst value1 = '$123.45';\nconst value2 = '€123.45';\nconst value3 = '£123.45';\n\nconst result1 = value1.replace(regex, '');\nconst result2 = value2.replace(regex, '');\nconst result3 = value3.replace(regex, '');\n\nconsole.log(result1); // 123.45\nconsole.log(result2); // 123.45\nconsole.log(result3); // 123.45","source":"","author":{"id":"ZaEGE0","name":"Iona","avatar":"1629030407609__ZaEGE0__w40px_h40px.png","points":445,"role":"BASIC"},"creationTime":1639068000000,"updateTime":1639156192000,"removalTime":null}]}}]};