Help me please..
Why this code does not works :
Code:
var pattern = new RegExp("\s\[x\]$");
var gototext = document.getElementById(index).text.replace(pattern,"");
while this code works :
Code:
var gototext = document.getElementById(index).text.replace(/\s\[x\]$/,"");
I test it in firefox..
Pattern that i need is : [x] in the end of string.

Thanks for any help..