S
silly putty
hello. this is all the code in my javascript. there's nothing else in
the html page except for the following:
var regex = new RegExp("\|A\|");
if (regex.test("8_2006|13|15|31|"))
alert("success");
else
alert("fail");
if i run the above code, i get the "success" message box, but shouldn't
the "fail" message appear instead? the regular expression is defined
as the character A surrounded by a pipe on each end, but there's no
instance of that expression in my string when i perform the test. can
someone please help? thanks
the html page except for the following:
var regex = new RegExp("\|A\|");
if (regex.test("8_2006|13|15|31|"))
alert("success");
else
alert("fail");
if i run the above code, i get the "success" message box, but shouldn't
the "fail" message appear instead? the regular expression is defined
as the character A surrounded by a pipe on each end, but there's no
instance of that expression in my string when i perform the test. can
someone please help? thanks