RegExp.lastMatch : RegExp Object : Regular Expressions JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Regular Expressions » RegExp Object »

 

RegExp.lastMatch







The lastMatch property represents the last matched characters.












<html>
    <body>
    <script language="JavaScript">
    <!--

    var pat = new RegExp("test""gi");

    str = "This is a test";

    myArray = pat.exec(str);
    document.write("Pattern found: " + myArray[0". the last match expression is: " + RegExp.lastMatch);
    -->
    </script>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Regular Expressions
» RegExp Object