I can find text using a Regex (Paragraph.FindAllByPattern function) but
cannot replace text with a Regex (Paragraph.ReplaceText function). Am I missing something?
This matches the text:
$WordDocument.Paragraphs[2].FindAllByPattern('E.*?e',[System.Text.RegularExpressions.RegexOptions]::None)
This uses the same pattern but does not do the replacement:
$WordDocument.Paragraphs[2].ReplaceText('E.*?e','Awesomeness', $false, [System.Text.RegularExpressions.RegexOptions]::None)
I can find text using a Regex (Paragraph.FindAllByPattern function) but
cannot replace text with a Regex (Paragraph.ReplaceText function). Am I missing something?
This matches the text:
$WordDocument.Paragraphs[2].FindAllByPattern('E.*?e',[System.Text.RegularExpressions.RegexOptions]::None)This uses the same pattern but does not do the replacement:
$WordDocument.Paragraphs[2].ReplaceText('E.*?e','Awesomeness', $false, [System.Text.RegularExpressions.RegexOptions]::None)