4
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 were tested on the Regexr site as in the example here: http://regexr.com/3eo6t
I was already answering my own question with that same rsrs, I traveled here putting as string a regex
– LeandroLuk
@Leandroluk depends on the language, some precise quotation marks and delimiters.
– rray
that’s why I made a mistake, to learn a language beat in college, I swaddled all kkk
– LeandroLuk