RegexCollection Interface
Represents a collection of regular expressions to be recognized by a smart tag in an Office solution.
Namespace: Microsoft.Office.Tools
Assembly: Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)
Syntax
'Declaration
<GuidAttribute("cfab1305-802f-4c99-8aa2-f68281840d39")> _
Public Interface RegexCollection _
Inherits IList, ICollection, IEnumerable
[GuidAttribute("cfab1305-802f-4c99-8aa2-f68281840d39")]
public interface RegexCollection : IList,
ICollection, IEnumerable
The RegexCollection type exposes the following members.
Properties
Name | Description | |
---|---|---|
Count | Gets the number of elements contained in the ICollection. (Inherited from ICollection.) | |
IsFixedSize | Gets a value indicating whether the IList has a fixed size. (Inherited from IList.) | |
IsReadOnly | Gets a value indicating whether the IList is read-only. (Inherited from IList.) | |
IsSynchronized | Gets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from ICollection.) | |
Item | Gets or sets the regular expression at the specified index. | |
SyncRoot | Gets an object that can be used to synchronize access to the ICollection. (Inherited from ICollection.) |
Top
Methods
Name | Description | |
---|---|---|
Add(Object) | Adds an item to the IList. (Inherited from IList.) | |
Add(Regex) | Adds a regular expression to the end of the RegexCollection. | |
AddRange | Adds an array of regular expressions to the end of RegexCollection. | |
Clear | Removes all items from the IList. (Inherited from IList.) | |
Contains(Object) | Determines whether the IList contains a specific value. (Inherited from IList.) | |
Contains(Regex) | Determines whether the RegexCollection contains a specific regular expression. | |
CopyTo(Array, Int32) | Copies the elements of the ICollection to an Array, starting at a particular Array index. (Inherited from ICollection.) | |
CopyTo(array<Regex[], Int32) | Copies the entire RegexCollection to a compatible one-dimensional array, starting at the specified index of the target array. | |
GetEnumerator | Returns an enumerator that iterates through a collection. (Inherited from IEnumerable.) | |
IndexOf(Object) | Determines the index of a specific item in the IList. (Inherited from IList.) | |
IndexOf(Regex) | Searches for the specified regular expression and returns the zero-based index of the first occurrence within the entire RegexCollection. | |
Insert(Int32, Object) | Inserts an item to the IList at the specified index. (Inherited from IList.) | |
Insert(Int32, Regex) | Inserts an element into the RegexCollection at the specified index. | |
Remove(Object) | Removes the first occurrence of a specific object from the IList. (Inherited from IList.) | |
Remove(Regex) | Removes the first occurrence of a specific regular expression from the RegexCollection. | |
RemoveAt | Removes the IList item at the specified index. (Inherited from IList.) |
Top
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..