Back to BaseTextElement`1
ReplaceMethod
Definition
- Namespace
- DOM.Elements.TextElements
- Assembly
- DOM.dll
Replaces occurrences of with in this element's text content. searchText replaceText
Replace(string searchText, string replaceText, RegexOptions? regexOption, bool wholeWordOnly, bool caseSensitive)Parameters
- searchText
- The text or pattern to search for. If or empty, implementations should typically return the original element unmodified.
- replaceText
- The replacement text to insert for each match. May be or empty to remove matches depending on implementation.
- regexOption
- Optional to apply when performing the replace. When, implementations should use a sensible default. If the is not a regular expression, may be ignored depending on the implementation. RegexOptions searchText regexOption
- wholeWordOnly
- When, replace only whole-word occurrences. Implementations should apply word-boundary semantics to avoid partial replacements.
- caseSensitive
- When, perform case-sensitive replacements; otherwise perform case-insensitive replacements.
Returns
An instance of representing the element after performing replacements. Implementations may return the same instance (mutating) or a new instance (immutable-style). T