Mega Code Archive

 
Categories / JavaScript Tutorial / Regular Expressions
 

RegExp $ (5)

The RegExp.$' property represents the substring following the most pattern match. This is the same as using the rightContext property. <html>     <body>     <script language="JavaScript">     <!--     pat = /is*/gi;     var str = "This is a test.";     myArray = pat.exec(str);     document.write("The RegExp.rightContext is: " + RegExp.rightContext);     -->     </script>     </body>     </html>