Class
RegexTagger

Represents a RegexTagger that processes and tags text based on regular expressions.

Definition

Namespace:Telerik.Windows.Documents.Model.Code

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class RegexTagger : TaggerBase<ClassificationTag>, ITagger<ClassificationTag>

Inheritance: objectTaggerBase<ClassificationTag>RegexTagger

Implements: ITagger<ClassificationTag>

Inherited Members TaggerBase<ClassificationTag>.EditorTaggerBase<ClassificationTag>.Document

Constructors

RegexTagger(Dictionary<Regex, ClassificationType>)

Declaration

cs-api-definition
public RegexTagger(Dictionary<Regex, ClassificationType> regexToClassificationType)

Parameters

regexToClassificationType

Dictionary<Regex, ClassificationType>

Methods

GetKeywordsRegex(IEnumerable<string>)

Creates regular expression by a list of keywords.

Declaration

cs-api-definition
public static Regex GetKeywordsRegex(IEnumerable<string> keywords)

Parameters

keywords

IEnumerable<string>

A list of keywords.

Returns

Regex

GetTags(IDocumentEditor)

Retrieves a collection of tags from the specified document editor using regex tagging.

Declaration

cs-api-definition
public override IEnumerable<TaggedTextRange<ClassificationTag>> GetTags(IDocumentEditor editor)

Parameters

editor

IDocumentEditor

The document editor from which to retrieve the tags.

Returns

IEnumerable<TaggedTextRange<ClassificationTag>>

A collection of tags extracted from the document editor.

Overrides TaggerBase<ClassificationTag>.GetTags(IDocumentEditor)