RegExp.global : RegExp Object : Regular Expressions JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Regular Expressions » RegExp Object »

 

RegExp.global








The global property specifies whether or not the g flag is used with the regular expression.

If so, a global pattern match will be performed.












<html>
    <body>
    <script language="JavaScript">
    <!--
        var myPat = new RegExp("is""g");
    
        var str = "This is a test";
    
        myArray = myPat.exec(str);
    
        document.write("The value of RegExp.global is: " "<b>" + myPat.global + "</b>");
    -->
    </script>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Regular Expressions
» RegExp Object