Previous PageNext Page

replace Method

Replaces the text found by a regular expression with other text.

Syntax

stringObj.match(rgExp, replaceText)

Arguments

stringObj
The name of a String object. Required
rgExp
A Regular Expression object describing what to search for. Required.
replaceText
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.


Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page