When I test my javascript at this site it behaves as I would expect.
However when I try and test it on my page it ALWAYS fails the test
function testName() {
if (new RegExp('^(?!^(\..+)?$)[^\x00-\x1f\\?*:^&!`~@#$$+=<>\?\*;|/]+$').test("me")) {
alert("good");
}
else {
alert("invalid characters");
} return false;
}
The expression is supposed to test a file name for special characters like ^&*!~
+=<>` etc.
Am I missing something stupid?