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>');
document.write(tex);
Someone have any idea?
|