跳到主要内容

SearchAndReplace

查找并替换文本。

语法

expression.SearchAndReplace(oProperties);

expression - 表示 Api 类的变量。

参数

名称必需/可选数据类型默认值描述
oProperties必需Object包含搜索和替换字符串的对象。
oProperties.searchString必需string搜索字符串。
oProperties.replaceString必需string替换字符串。
oProperties.matchCase可选booleantrue是否区分大小写。

返回值

此方法不返回任何数据。

示例

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