Microsoft® JScript™
replace Method
 Language Reference 
Version 3 

See Also                  Applies To


Description
Replaces the text found by a regular expression with other text.
Syntax
stringObj.match(rgExp, replaceText)

The replace method syntax has these parts:

Part Description
stringObj Required. The String object or literal on which to perform the replace. This object is not modified by the replace method.
rgExp Required. A Regular Expression object describing what to search for.
replaceText Required. A String object or literal containing the text to replace for every successful match of rgExp in stringObj.

Remarks
The result of the replace method is a copy of stringObj after all replacements have been made.

The method updates the contents of the RegExp object.


© 1997 by Microsoft Corporation. All rights reserved.