跳到主要内容

SearchAndReplace

Finds and replaces the text.

Syntax

expression.SearchAndReplace(oProperties);

expression - A variable that represents a Api class.

Parameters

NameRequired/OptionalData typeDefaultDescription
oPropertiesRequiredObjectAn object which contains the search and replacement strings.
oProperties.searchStringRequiredstringThe search string.
oProperties.replaceStringRequiredstringThe replacement string.
oProperties.matchCaseOptionalbooleantrueCase sensitive or not.

Returns

This method doesn't return any data.

Example

window.Asc.plugin.executeMethod ("SearchAndReplace", [
{
"searchString": "text1",
"replaceString": "text2",
"matchCase": true
}
]);