Replace method don't work with [ ] /
I’m having problem with replace method, I can’t replace the char “[”, “]” and “/”. I tried with back slash, ascii, and didn’t worked. Look the example:
var tex = "[link href=”...”] Test [/link]";
tex = tex.replace(/[link href=/gi,'<a href=');
tex = tex.replace(/[/link]/gi,'</a>');
Someone have any idea?