RegExp.$'
JavaScript 1.2+, Jscript 3.0+ Nav4+, NES3+, IE4+ Syntax
RegExp.$'
Description
The RegExp.$' property represents the substring following the most pattern match. This is the same as using the rightContext property.
Example
Listing 6.211 shows how to use RegExp.$'.
Listing 6.211 Example of RegExp.$'
<html> <body> <script language="JavaScript"> <!–– Hide // define a regular expression pattern and match globally pat = /be*/gi; // create a string object var str = "Eat Drink and be Merry."; // create an array to hold the results myArray = pat.exec(str); document.write("In the string: " + "<b>" + "Eat Drink and be Merry" + "</b><br><br>"); document.write("The RegExp.rightContext is: " + RegExp.rightContext); // End Hide ––> </script> ... |
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.