<html>
<body>
<h1>JavaScript 正则表达式</h1>
<p>在字符串开头搜索 "Is":</p>
<p id="demo"></p>
<script>
let text = "Is this his";
let pattern = /^Is/g;
let result = text.match(pattern);
document.getElementById("demo").innerHTML = result;
</script>
</body>
</html>