Replaces all instances of in the specified document with the . Performs case-insensitive search by default.
Parameters
- span
- The replacement operation will be restricted to content in this document span.
- textToFind
- Text to replace. This can be a wildcard as well by specifying parameter with FindCriteria.Operator of FindOperator.Wildcard. Note that specifying null or empty string will do nothing and return a ReplaceResult object with 0 replacements.
- replacementText
- This is the text that will replace each instance of .
- error
- This will be set if an error occurs, such as when the 'textToFind' is indicated to be interpreted as a wild card but it's an invalid wildcard.
- findCriteria
- Used to specify whether it's a case sensitive search or whether to use wild card matching.
Return Value
A
ReplaceResult object that contains a list of replacements that were made.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2