Mega Code Archive

 
Categories / JavaScript Tutorial / Regular Expressions
 

RegExp lastParen

The lastParen property represents the last parenthesized substring match. It returns a string value for the last parenthesized substring. <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>