Skip to main content

SearchAndReplace

Finds and replaces the text.

Syntax​

expression.SearchAndReplace(oProperties);

expression - A variable that represents an 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
}
]);