Could you please explain, why output result of next match is s
?
Update: I thought that output should be I
as matched in regular range character.
var str = "Is this enough?";
var patt1 = new RegExp("[^A-J]");
var result = str.match(patt1); // ["s", index: 1, input: "Is this enought?"]
document.getElementById('id').innerHTML = result;
<p id="id"></p>