<html>
<body>
<p>Click the button to return the function that created the RegExp object's prototype.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var patt = new RegExp("Hello World", "g");
var res = patt.constructor;
document.getElementById("demo").innerHTML = res;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_regexp_constructor by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:01:32 GMT -->
</html>