Class DocumentTextSearch
Provides functionality for searching text in a RadDocument.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.TextSearch
Assembly: Telerik.Windows.Documents.dll
Syntax
public class DocumentTextSearch
Constructors
DocumentTextSearch(RadDocument)
Initializes a new instance of the DocumentTextSearch class.
Declaration
public DocumentTextSearch(RadDocument document)
Parameters
RadDocument
document
The document to search in. |
DocumentTextSearch(RadDocument, RegexOptions)
Initializes a new instance of the DocumentTextSearch class.
Declaration
public DocumentTextSearch(RadDocument document, RegexOptions options)
Parameters
RadDocument
document
The document to search in. |
System.Text.RegularExpressions.RegexOptions
options
The options which will be used in the search. |
Methods
Find(String)
Finds the string that matches a specified regular expression.
Declaration
public TextRange Find(string regex)
Parameters
System.String
regex
The regular expression. |
Returns
TextRange
The first match. |
Find(String, DocumentPosition)
Finds all strings after a specific position in the document that match a specified regular expression.
Declaration
public TextRange Find(string regex, DocumentPosition fromPosition)
Parameters
System.String
regex
The regular expression. |
DocumentPosition
fromPosition
Start position. |
Returns
TextRange
The first match. |
Find(String, DocumentPosition, DocumentPosition)
Finds a string between specific positions in the document that matches a specified regular expression.
Declaration
public TextRange Find(string regex, DocumentPosition fromPosition, DocumentPosition toPosition)
Parameters
System.String
regex
The regular expression. |
DocumentPosition
fromPosition
Start position. |
DocumentPosition
toPosition
End position. |
Returns
TextRange
The first match. |
FindAll(String)
Finds all strings in the document that match a specified regular expression.
Declaration
public IEnumerable<TextRange> FindAll(string regex)
Parameters
System.String
regex
The regular expression. |
Returns
System.Collections.Generic.IEnumerable<TextRange>
A collection of TextRanges representing the matches. |
FindAll(String, DocumentPosition, DocumentPosition)
Finds all strings between specific positions in the document that match a specified regular expression.
Declaration
public IEnumerable<TextRange> FindAll(string regex, DocumentPosition fromPosition, DocumentPosition toPosition)
Parameters
System.String
regex
The regular expression. |
DocumentPosition
fromPosition
Start position. |
DocumentPosition
toPosition
End position. |
Returns
System.Collections.Generic.IEnumerable<TextRange>
A collection of TextRanges representing the matches. |