x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript 正则表达式</h1>
<p>全局搜索不在从大写 A 到大写 E 范围内的字符:</p>
<p id="demo"></p>
<script>
let text = "I SCREAM FOR ICE CREAM!";
let pattern = /[^A-E]/g;
let result = text.match(pattern);
document.getElementById("demo").innerHTML = result;
</script>
</body>
</html>