<html>
<body>
<h2>JavaScript Regular Expressions</h2>
<p>The constructor property returns the function that created the RegExp prototype:</p>
<p id="demo"></p>
<script>
let pattern = /Hello World/g;
let text = pattern.constructor;
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>