Class TextMatch
One match of a search.
public sealed class TextMatch
- Inheritance
-
TextMatch
- Inherited Members
Properties
- Groups
Gets the regular-expression capture groups, group 1 first. Empty for a plain-text search and for a pattern with no groups.
- Index
Gets the offset of the match within the paragraph's searchable text — the concatenation, in document order, of the paragraph's searchable segments.
- Paragraph
Gets the paragraph the match was found in.
- Span
Gets where the match is, as a span of document positions: what ReplaceRange(WordDocument, DocumentSpan, string, CharacterFormat?) or FormatText(WordDocument, DocumentSpan, Action<CharacterFormat>) take, and what an editor selects. Index counts only the searchable text, so it is not a DocumentPosition offset.
- Value
Gets the matched text.