Edit The Code:
See Result »
Try it Yourself - ©
w3big.com
<!DOCTYPE html> <html> <body> <script> var str="Visit W3Cschool"; var patt1=/W3C/g; document.write("The text of the RegExp is: "+patt1.source); </script> </body> </html>