RegexCollection Interface

Definition

Represents a collection of regular expressions to be recognized by a smart tag in an Office solution.

public interface class RegexCollection : System::Collections::IList
[System.Runtime.InteropServices.Guid("cfab1305-802f-4c99-8aa2-f68281840d39")]
public interface RegexCollection : System.Collections.IList
[<System.Runtime.InteropServices.Guid("cfab1305-802f-4c99-8aa2-f68281840d39")>]
type RegexCollection = interface
    interface IList
    interface ICollection
    interface IEnumerable
Public Interface RegexCollection
Implements IList
Attributes
Implements

Remarks

When you create a Microsoft.Office.Tools.Excel.SmartTag or Microsoft.Office.Tools.Word.SmartTag object to create a smart tag, you can use the Expressions property to add a regular expression to be recognized by the smart tag. The Expressions property has the type RegexCollection.

This type is intended to be used only in projects for Excel 2007 and Word 2007. Smart tags are deprecated in Excel 2010 and Word 2010..

Properties

Item[Int32]

Gets or sets the regular expression at the specified index.

Methods

Add(Regex)

Adds a regular expression to the end of the RegexCollection.

AddRange(Regex[])

Adds an array of regular expressions to the end of RegexCollection.

Contains(Regex)

Determines whether the RegexCollection contains a specific regular expression.

CopyTo(Regex[], Int32)

Copies the entire RegexCollection to a compatible one-dimensional array, starting at the specified index of the target array.

IndexOf(Regex)

Searches for the specified regular expression and returns the zero-based index of the first occurrence within the entire RegexCollection.

Insert(Int32, Regex)

Inserts an element into the RegexCollection at the specified index.

Remove(Regex)

Removes the first occurrence of a specific regular expression from the RegexCollection.

Applies to