Version

ReplaceAll(DocumentSpan,String,NodeBase,String,FindCriteria) Method

Replaces all instances of textToFind in the specified document span with the replacementContent. Performs case-insensitive search by default.
Syntax
'Declaration
 
Public Overloads Function ReplaceAll( _
   ByVal span As DocumentSpan, _
   ByVal textToFind As String, _
   ByVal replacementContent As NodeBase, _
   ByRef error As String, _
   Optional ByVal findCriteria As FindCriteria _
) As ReplaceResult
public ReplaceResult ReplaceAll( 
   DocumentSpan span,
   string textToFind,
   NodeBase replacementContent,
   out string error,
   FindCriteria findCriteria
)

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 findCriteria 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.
replacementContent
This is the content that will replace each instance of textToFind.
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.
Requirements

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

See Also