Hello, I'm having trouble applying a simple regex with Javascript. So:
var str = "/Date(1421287200000-0200)/";
console.log(str.replace('/\//g','')); //não funciona, mesmo estando certo
console.log(str.replace('/[/]/g','')); //não funciona, mesmo envolvendo "/"
console.log(str.replace('/','').replace('/','')); //funciona, mas não tem lógica
How to solve this problem only with regex in Javascript?
NOTE : The first two examples have been tested on the Regexr site as in the example here: link