An intrinsic global object that stores information about the results of regular expression pattern matches. This object cannot be constructed explicitly.
The RegExp object cannot be created directly, but it is always available. Until a successful regular expression search has been completed, the initial values of the various properties of the RegExp object are as follows:
$1 - $9
The global RegExp object should not be confused with the Regular Expression object. Although they sound similar, they are separate and distinct. The properties of the global RegExp object contain continually updated information about each match as it occurs, while the properties of the Regular Expression object contain only information about the matches that occur with a single instance of the Regular Expression.
The properties of RegExp are not available when running in fast mode, the default for JScript. To compile a program from the command line that uses these properties, you must turn off the fast option by using /fast-. It is not safe to turn off the fast option in ASP.NET because of threading issues.
The following example illustrates the use of the global RegExp object. This example must be compiled with the /fast- option.