Menu
Here’s a real easy question. I hope. Can someone tell me why this doesn’t work:
var stringTest = “Grendel”;
pattern = new RegExp(“n”);
stringTest.replace(pattern,’m’);
alert(stringTest);
All it “returns” is “Grendel”. It doesn’t report an error or anything, it just fails to match the ‘n’.