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>