<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>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_regexp_constructor by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:39:13 GMT -->
</html>