Class
DocumentTextSearch

Provides functionality for searching text in a RadDocument.

Definition

Namespace:Telerik.Windows.Documents.TextSearch

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class DocumentTextSearch

Inheritance: objectDocumentTextSearch

Constructors

DocumentTextSearch(RadDocument)

Initializes a new instance of the DocumentTextSearch class.

Declaration

cs-api-definition
public DocumentTextSearch(RadDocument document)

Parameters

document

RadDocument

The document to search in.

DocumentTextSearch(RadDocument, RegexOptions)

Initializes a new instance of the DocumentTextSearch class.

Declaration

cs-api-definition
public DocumentTextSearch(RadDocument document, RegexOptions options)

Parameters

document

RadDocument

The document to search in.

options

RegexOptions

The options which will be used in the search.

Methods

Find(string)

Finds the string that matches a specified regular expression.

Declaration

cs-api-definition
public TextRange Find(string regex)

Parameters

regex

string

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

cs-api-definition
public TextRange Find(string regex, DocumentPosition fromPosition)

Parameters

regex

string

The regular expression.

fromPosition

DocumentPosition

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

cs-api-definition
public TextRange Find(string regex, DocumentPosition fromPosition, DocumentPosition toPosition)

Parameters

regex

string

The regular expression.

fromPosition

DocumentPosition

Start position.

toPosition

DocumentPosition

End position.

Returns

TextRange

The first match.

FindAll(string)

Finds all strings in the document that match a specified regular expression.

Declaration

cs-api-definition
public IEnumerable<TextRange> FindAll(string regex)

Parameters

regex

string

The regular expression.

Returns

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

cs-api-definition
public IEnumerable<TextRange> FindAll(string regex, DocumentPosition fromPosition, DocumentPosition toPosition)

Parameters

regex

string

The regular expression.

fromPosition

DocumentPosition

Start position.

toPosition

DocumentPosition

End position.

Returns

IEnumerable<TextRange>

A collection of TextRanges representing the matches.