Do a global search for the character-span NOT from uppercase "A" to lowercase "e": - Javascript RegExp

Javascript examples for RegExp:Bracket

Description

Do a global search for the character-span NOT from uppercase "A" to lowercase "e":

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<button onclick="myFunction()">Test</button>

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

<script>
function myFunction() {//from w  w  w.  j  a v  a2  s  . c om
    var str = "The following code shows HOW TO ";
    var patt1 = /[^A-e]/g;
    var result = str.match(patt1);
    document.getElementById("demo").innerHTML = result;
}
</script>

</body>
</html>

Related Tutorials