x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript 正则表达式</h1>
<p>对字符串中的 "is" 进行全局、不区分大小写的搜索:</p>
<p id="demo"></p>
<script>
let text = "Is this all there is?";
let result = /is/gi.test(text);
document.getElementById("demo").innerHTML = result;
</script>
</body>
</html>