RegExp.$+ (6) : RegExp Object : Regular Expressions JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Regular Expressions » RegExp Object »

 

RegExp.$+ (6)








The RegExp.$+ property represents the last parenthesized substring pattern match.

This is the same as using the lastParen property.












<html>
    <body>
    <script language="JavaScript">
    <!--
    exp = new RegExp("(is)""g");

    str = "This is a test (is)!";

    myArray = exp.exec(str);

    document.write("The RegExp.lastParen is: " "<b>"+ RegExp.lastParen + "</b>");

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







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Regular Expressions
» RegExp Object