我正在尝试计算一个简单脚本进行的替换次数,如下所示:
$count = 0
Function findAndReplace($objFind, $FindText, $ReplaceWith) {
$count += $objFind.Execute($FindText, $matchCase, $matchWholeWord, \`
$matchWildCards, $matchSoundsLike, $matchAllWordForms, \`
$forward, $findWrap, $format, $ReplaceWith, $replace)
}
替换完成得很好,但$count
仍然在0
...