August 1999
Intermediate to advanced
1488 pages
72h 53m
English
RegExp.$'
The RegExp.$' property represents the substring following the most pattern match. This is the same as using the rightContext property.
Listing 6.211 shows how to use 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> ... |
Read now
Unlock full access