Why the test method does not always work correctly - does it show true then false ?
Here, for example, the template /<(.|\n??>/g on tag elements, I look at returning true in the debager, but the condition doesn’t go into the if - it says that it is false , why?
I check this:
var s = "<div></div>"; var pattern = /<(.|\n)*?>/g; if(pattern.test(s)) alert("found");