'Declaration Public Shared Function Replace( _ ByVal searchRange As RangeBase, _ ByVal findPattern As System.String, _ ByVal replaceText As System.String, _ Optional ByVal options As FindReplaceOptions _ ) As System.Integer
public static System.int Replace( RangeBase searchRange, System.string findPattern, System.string replaceText, FindReplaceOptions options )
Parameters
- searchRange
- The current range.
- findPattern
- The search pattern. May contain regular expressions, or be an empty string.
If empty, the search will be for any text with formatting that matches the FindOptions.FormattingOptions passed in options.
- replaceText
- The replacement text.
If empty, the found text will be removed. FindReplaceOptions.ReplacingCallback can still be used to provide a replacement string.
If null, no replacement will occur, but FindReplaceOptions.ReplacingCallback and FindReplaceOptions.ReplacedCallback will still be called. - options
- The search and replace options.