RegExp.leftContext : RegExp Object : Regular Expressions JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Regular Expressions » RegExp Object »

 

RegExp.leftContext







The leftContext property represents the substring preceding the most recent pattern match.












<html>
    <body>
    <script language="JavaScript">
    <!--
    pat = /is*/g;

    var str = "This is a test";

    myArray = pat.exec(str);

    document.write("In the string: " "<b>" "I know where the fish is tonight" "</b><br><br>");
    document.write("The RegExp.leftContext is: " + RegExp.leftContext);

    -->
    </script>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Regular Expressions
» RegExp Object