August 1999
Intermediate to advanced
1488 pages
72h 53m
English
regexp.rightContext
The rightContext property of the RegExp object represents the substring following the most recent pattern match.
Listing 6.224 shows how the rightContext property is used.
<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); // ... |
Read now
Unlock full access