DocumentTextSearch
Provides functionality for searching text in a RadDocument.
Definition
Namespace:Telerik.WinForms.Documents.TextSearch
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class DocumentTextSearch
Inheritance: objectDocumentTextSearch
Constructors
Initializes a new instance of the DocumentTextSearch class.
public DocumentTextSearch(RadDocument document, RegexOptions options)
The document to search in.
optionsRegexOptionsThe options which will be used in the search.
Initializes a new instance of the DocumentTextSearch class.
public DocumentTextSearch(RadDocument document)
The document to search in.
Methods
Finds a string between specific positions in the document that matches a specified regular expression.
public TextRange Find(string regex, DocumentPosition fromPosition, DocumentPosition toPosition)
The regular expression.
fromPositionDocumentPositionStart position.
toPositionDocumentPositionEnd position.
Returns:The first match.
Finds all strings after a specific position in the document that match a specified regular expression.
public TextRange Find(string regex, DocumentPosition fromPosition)
The regular expression.
fromPositionDocumentPositionStart position.
Returns:The first match.
Finds all strings between specific positions in the document that match a specified regular expression.
public IEnumerable<TextRange> FindAll(string regex, DocumentPosition fromPosition, DocumentPosition toPosition)
The regular expression.
fromPositionDocumentPositionStart position.
toPositionDocumentPositionEnd position.
Returns:IEnumerable<TextRange>
A collection of TextRanges representing the matches.