Edit This Code:
<!DOCTYPE html>
<html>
<body>

<p>Click the button to do a global search for the character-span NOT from lowercase a to lowercase h in a string.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var str = "Is this all there is?";
    var patt1 = /[^a-h]/g;
    var result = str.match(patt1);
    document.getElementById("demo").innerHTML = result;
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy