System.Text.RegularExpressions
System.Text.RegularExpressions.Capture
Represents the results from a single successful subexpression capture.
System.Text.RegularExpressions.Capture.ToString
Retrieves the captured substring from the input string by calling the System.Text.RegularExpressions.Capture.Value property.
Returns
The substring that was captured by the match.
System.Text.RegularExpressions.Capture.Index
The position in the original string where the first character of the captured substring is found.
Returns
The zero-based starting position in the original string where the captured substring is found.
System.Text.RegularExpressions.Capture.Length
Gets the length of the captured substring.
Returns
The length of the captured substring.
System.Text.RegularExpressions.Capture.Value
Gets the captured substring from the input string.
Returns
The substring that is captured by the match.
System.Text.RegularExpressions.Capture.ValueSpan
Gets the captured span from the input string.
Returns
The span that is captured by the match.
System.Text.RegularExpressions.CaptureCollection
Represents the set of captures made by a single capturing group. The collection is immutable (read-only) and has no public constructor.
System.Text.RegularExpressions.CaptureCollection.CopyTo()
Copies all the elements of the collection to the given array beginning at the given index.
Parameters
| Name | Description | Default |
|---|---|---|
array |
The array the collection is to be copied into. | |
arrayIndex |
The position in the destination array where copying is to begin. |
System.Text.RegularExpressions.CaptureCollection.CopyTo()
Copies the elements of the collection to an System.Array, starting at a particular System.Array index.
Parameters
| Name | Description | Default |
|---|---|---|
array |
The one-dimensional System.Array that is the destination of the elements copied from the collection. The System.Array must have zero-based indexing. | |
arrayIndex |
The zero-based index in array at which copying begins. |
System.Text.RegularExpressions.CaptureCollection.GetEnumerator
Provides an enumerator that iterates through the collection.
Returns
An object that contains all System.Text.RegularExpressions.Capture objects within the System.Text.RegularExpressions.CaptureCollection.
System.Text.RegularExpressions.CaptureCollection.System#Collections#Generic#ICollection{System#Text#RegularExpressions#Capture}#Add()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
item |
The object to add to the collection. |
System.Text.RegularExpressions.CaptureCollection.System#Collections#Generic#ICollection{System#Text#RegularExpressions#Capture}#Clear
Calling this method always throws System.NotSupportedException.
System.Text.RegularExpressions.CaptureCollection.System#Collections#Generic#ICollection{System#Text#RegularExpressions#Capture}#Contains()
Determines whether the collection contains a specific value.
Parameters
| Name | Description | Default |
|---|---|---|
item |
The object to locate in the collection. |
Returns
System.Text.RegularExpressions.CaptureCollection.System#Collections#Generic#ICollection{System#Text#RegularExpressions#Capture}#Remove()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
item |
The object to remove from the collection. |
Returns
Calling this method always throws System.NotSupportedException.
System.Text.RegularExpressions.CaptureCollection.System#Collections#Generic#IEnumerable{System#Text#RegularExpressions#Capture}#GetEnumerator
Returns an enumerator that iterates through the collection.
Returns
An enumerator that can be used to iterate through the collection.
System.Text.RegularExpressions.CaptureCollection.System#Collections#Generic#IList{System#Text#RegularExpressions#Capture}#IndexOf()
Determines the index of a specific item in the collection.
Parameters
| Name | Description | Default |
|---|---|---|
item |
The object to locate in the collection. |
Returns
The index of item if found in the list; otherwise, -1.
System.Text.RegularExpressions.CaptureCollection.System#Collections#Generic#IList{System#Text#RegularExpressions#Capture}#Insert()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index at which item should be inserted. | |
item |
The object to insert into the collection. |
System.Text.RegularExpressions.CaptureCollection.System#Collections#Generic#IList{System#Text#RegularExpressions#Capture}#RemoveAt()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index of the item to remove. |
System.Text.RegularExpressions.CaptureCollection.System#Collections#IList#Add()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
value |
The object to add to the collection. |
Returns
Calling this method always throws System.NotSupportedException.
System.Text.RegularExpressions.CaptureCollection.System#Collections#IList#Clear
Calling this method always throws System.NotSupportedException.
System.Text.RegularExpressions.CaptureCollection.System#Collections#IList#Contains()
Determines whether the collection contains a specific value.
Parameters
| Name | Description | Default |
|---|---|---|
value |
The object to locate in the collection. |
Returns
System.Text.RegularExpressions.CaptureCollection.System#Collections#IList#IndexOf()
Determines the index of a specific item in the collection.
Parameters
| Name | Description | Default |
|---|---|---|
value |
The object to locate in the collection. |
Returns
The index of value if found in the list; otherwise, -1.
System.Text.RegularExpressions.CaptureCollection.System#Collections#IList#Insert()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index at which value should be inserted. | |
value |
The object to insert into the collection. |
System.Text.RegularExpressions.CaptureCollection.System#Collections#IList#Remove()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
value |
The object to remove from the collection. |
System.Text.RegularExpressions.CaptureCollection.System#Collections#IList#RemoveAt()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index of the item to remove. |
System.Text.RegularExpressions.CaptureCollection.Count
Gets the number of substrings captured by the group.
Returns
The number of items in the System.Text.RegularExpressions.CaptureCollection.
System.Text.RegularExpressions.CaptureCollection.IsReadOnly
Gets a value that indicates whether the collection is read only.
Returns
true in all cases.
System.Text.RegularExpressions.CaptureCollection.IsSynchronized
Gets a value that indicates whether access to the collection is synchronized (thread-safe).
Returns
false in all cases.
System.Text.RegularExpressions.CaptureCollection.Item()
Gets an individual member of the collection.
Parameters
| Name | Description | Default |
|---|---|---|
i |
Index into the capture collection. |
Returns
The captured substring at position i in the collection.
System.Text.RegularExpressions.CaptureCollection.SyncRoot
Gets an object that can be used to synchronize access to the collection.
Returns
An object that can be used to synchronize access to the collection.
System.Text.RegularExpressions.CaptureCollection.System#Collections#Generic#IList{System#Text#RegularExpressions#Capture}#Item()
Gets the element at the specified index.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index of the element to get. |
Returns
The element at the specified index.
System.Text.RegularExpressions.CaptureCollection.System#Collections#IList#IsFixedSize
Gets a value indicating whether the collection has a fixed size.
Returns
true, since the collection has a fixed size.
System.Text.RegularExpressions.CaptureCollection.System#Collections#IList#Item()
Gets the element at the specified index.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index of the element to get. |
Returns
The element at the specified index.
System.Text.RegularExpressions.GeneratedRegexAttribute
Instructs the System.Text.RegularExpressions source generator to generate an implementation of the specified regular expression.
System.Text.RegularExpressions.GeneratedRegexAttribute.#ctor()
Initializes a new instance of System.Text.RegularExpressions.GeneratedRegexAttribute with the specified pattern.
Parameters
| Name | Description | Default |
|---|---|---|
pattern |
The regular expression pattern to match. |
System.Text.RegularExpressions.GeneratedRegexAttribute.#ctor()
Initializes a new instance of System.Text.RegularExpressions.GeneratedRegexAttribute with the specified pattern and options.
Parameters
| Name | Description | Default |
|---|---|---|
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that modify the regular expression. |
System.Text.RegularExpressions.GeneratedRegexAttribute.#ctor()
Initializes a new instance of System.Text.RegularExpressions.GeneratedRegexAttribute with the specified pattern, options, and time-out value.
Parameters
| Name | Description | Default |
|---|---|---|
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that modify the regular expression. | |
matchTimeoutMilliseconds |
A time-out interval (milliseconds), or System.Threading.Timeout.Infinite to indicate that the method should not time out. |
System.Text.RegularExpressions.GeneratedRegexAttribute.#ctor()
Initializes a new instance of System.Text.RegularExpressions.GeneratedRegexAttribute with the specified pattern, options, time-out value, and culture.
Parameters
| Name | Description | Default |
|---|---|---|
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that modify the regular expression. | |
matchTimeoutMilliseconds |
A time-out interval (milliseconds), or System.Threading.Timeout.Infinite to indicate that the method should not time out. | |
cultureName |
The name of a culture to be used for case sensitive comparisons. cultureName is not case-sensitive. |
System.Text.RegularExpressions.GeneratedRegexAttribute.#ctor()
Initializes a new instance of System.Text.RegularExpressions.GeneratedRegexAttribute with the specified pattern and options.
Parameters
| Name | Description | Default |
|---|---|---|
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that modify the regular expression. | |
cultureName |
The name of a culture to be used for case sensitive comparisons. cultureName is not case-sensitive. |
System.Text.RegularExpressions.GeneratedRegexAttribute.CultureName
Gets the name of the culture to be used for case sensitive comparisons.
System.Text.RegularExpressions.GeneratedRegexAttribute.MatchTimeoutMilliseconds
Gets a time-out interval (milliseconds), or System.Threading.Timeout.Infinite to indicate that the method should not time out.
System.Text.RegularExpressions.GeneratedRegexAttribute.Options
Gets a bitwise combination of the enumeration values that modify the regular expression.
System.Text.RegularExpressions.GeneratedRegexAttribute.Pattern
Gets the regular expression pattern to match.
System.Text.RegularExpressions.Group
Represents the results from a single capturing group.
System.Text.RegularExpressions.Group.Synchronized()
Returns a Group object equivalent to the one supplied that is safe to share between multiple threads.
Parameters
| Name | Description | Default |
|---|---|---|
inner |
The input System.Text.RegularExpressions.Group object. |
Returns
A regular expression Group object.
System.Text.RegularExpressions.Group.Captures
Gets a collection of all the captures matched by the capturing group, in innermost-leftmost-first order (or innermost-rightmost-first order if the regular expression is modified with the System.Text.RegularExpressions.RegexOptions.RightToLeft option). The collection may have zero or more items.
Returns
The collection of substrings matched by the group.
System.Text.RegularExpressions.Group.Name
Returns the name of the capturing group represented by the current instance.
Returns
The name of the capturing group represented by the current instance.
System.Text.RegularExpressions.Group.Success
Gets a value indicating whether the match is successful.
Returns
System.Text.RegularExpressions.GroupCollection
Returns the set of captured groups in a single match. The collection is immutable (read-only) and has no public constructor.
System.Text.RegularExpressions.GroupCollection.ContainsKey()
Determines whether the group collection contains a captured group identified by the specified name.
Parameters
| Name | Description | Default |
|---|---|---|
key |
A string with the name of the captured group to locate. |
Returns
System.Text.RegularExpressions.GroupCollection.CopyTo()
Copies all the elements of the collection to the given array beginning at the given index.
Parameters
| Name | Description | Default |
|---|---|---|
array |
The array the collection is to be copied into. | |
arrayIndex |
The position in the destination array where the copying is to begin. |
System.Text.RegularExpressions.GroupCollection.CopyTo()
Copies the elements of the group collection to a System.Text.RegularExpressions.Group array, starting at a particular array index.
Parameters
| Name | Description | Default |
|---|---|---|
array |
The one-dimensional array that is the destination of the elements copied from the group collection. The array must have zero-based indexing. | |
arrayIndex |
The zero-based index in array at which copying begins. |
System.Text.RegularExpressions.GroupCollection.GetEnumerator
Provides an enumerator that iterates through the collection.
Returns
An enumerator that contains all System.Text.RegularExpressions.Group objects in the System.Text.RegularExpressions.GroupCollection.
System.Text.RegularExpressions.GroupCollection.System#Collections#Generic#ICollection{System#Text#RegularExpressions#Group}#Add()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
item |
The group to add to the collection. |
System.Text.RegularExpressions.GroupCollection.System#Collections#Generic#ICollection{System#Text#RegularExpressions#Group}#Clear
Calling this method always throws System.NotSupportedException.
System.Text.RegularExpressions.GroupCollection.System#Collections#Generic#ICollection{System#Text#RegularExpressions#Group}#Contains()
Determines whether the group collection contains a specific group item.
Parameters
| Name | Description | Default |
|---|---|---|
item |
The group to locate in the group collection. |
Returns
System.Text.RegularExpressions.GroupCollection.System#Collections#Generic#ICollection{System#Text#RegularExpressions#Group}#Remove()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
item |
The group to remove. |
Returns
Calling this method always throws System.NotSupportedException.
System.Text.RegularExpressions.GroupCollection.System#Collections#Generic#IEnumerable{System#Collections#Generic#KeyValuePair{System#String@System#Text#RegularExpressions#Group}}#GetEnumerator
Provides an enumerator that iterates through the group collection.
Returns
An enumerator that contains all names and objects in the System.Text.RegularExpressions.Group collection.
System.Text.RegularExpressions.GroupCollection.System#Collections#Generic#IEnumerable{System#Text#RegularExpressions#Group}#GetEnumerator
Provides an enumerator that iterates through the group collection.
Returns
An enumerator that contains all System.Text.RegularExpressions.Group objects in the group collection.
System.Text.RegularExpressions.GroupCollection.System#Collections#Generic#IList{System#Text#RegularExpressions#Group}#IndexOf()
Determines the index of a specific group in the group collection.
Parameters
| Name | Description | Default |
|---|---|---|
item |
The group to locate in the group collection. |
Returns
The index of the item if found; otherwise, -1.
System.Text.RegularExpressions.GroupCollection.System#Collections#Generic#IList{System#Text#RegularExpressions#Group}#Insert()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The position at which to insert the group. | |
item |
The group to insert. |
System.Text.RegularExpressions.GroupCollection.System#Collections#Generic#IList{System#Text#RegularExpressions#Group}#RemoveAt()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index of the group to remove. |
System.Text.RegularExpressions.GroupCollection.System#Collections#IList#Add()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
value |
The object to add to the group collection. |
Returns
Calling this method always throws System.NotSupportedException.
System.Text.RegularExpressions.GroupCollection.System#Collections#IList#Clear
Calling this method always throws System.NotSupportedException.
System.Text.RegularExpressions.GroupCollection.System#Collections#IList#Contains()
Determines whether the group collection contains a specific group item.
Parameters
| Name | Description | Default |
|---|---|---|
value |
The group to locate in the group collection. |
Returns
System.Text.RegularExpressions.GroupCollection.System#Collections#IList#IndexOf()
Determines the index of a specific group in the group collection.
Parameters
| Name | Description | Default |
|---|---|---|
value |
The group to locate in the group collection. |
Returns
The index of the item if found; otherwise, -1.
System.Text.RegularExpressions.GroupCollection.System#Collections#IList#Insert()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The position at which to insert the group. | |
value |
The group to insert. |
System.Text.RegularExpressions.GroupCollection.System#Collections#IList#Remove()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
value |
The group to remove. |
System.Text.RegularExpressions.GroupCollection.System#Collections#IList#RemoveAt()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index of the group to remove. |
System.Text.RegularExpressions.GroupCollection.TryGetValue()
Attempts to retrieve a group identified by the provided name key, if it exists in the group collection.
Parameters
| Name | Description | Default |
|---|---|---|
key |
A string with the group name key to look for. | |
value |
When the method returns, the group whose name is key, if it is found; otherwise, null if not found. |
Returns
System.Text.RegularExpressions.GroupCollection.Count
Returns the number of groups in the collection.
Returns
The number of groups in the collection.
System.Text.RegularExpressions.GroupCollection.IsReadOnly
Gets a value that indicates whether the collection is read-only.
Returns
true in all cases.
System.Text.RegularExpressions.GroupCollection.IsSynchronized
Gets a value that indicates whether access to the System.Text.RegularExpressions.GroupCollection is synchronized (thread-safe).
Returns
false in all cases.
System.Text.RegularExpressions.GroupCollection.Item()
Enables access to a member of the collection by integer index.
Parameters
| Name | Description | Default |
|---|---|---|
groupnum |
The zero-based index of the collection member to be retrieved. |
Returns
The member of the collection specified by groupnum.
System.Text.RegularExpressions.GroupCollection.Item()
Enables access to a member of the collection by string index.
Parameters
| Name | Description | Default |
|---|---|---|
groupname |
The name of a capturing group. |
Returns
The member of the collection specified by groupname.
System.Text.RegularExpressions.GroupCollection.Keys
Gets a string enumeration that contains the name keys of the group collection.
Returns
The name keys of the group collection.
System.Text.RegularExpressions.GroupCollection.SyncRoot
Gets an object that can be used to synchronize access to the System.Text.RegularExpressions.GroupCollection.
Returns
A copy of the System.Text.RegularExpressions.Match object to synchronize.
System.Text.RegularExpressions.GroupCollection.System#Collections#Generic#IList{System#Text#RegularExpressions#Group}#Item()
Gets the group at the specified position in the collection.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index of the group in the group collection. |
Returns
The group in the desired position.
System.Text.RegularExpressions.GroupCollection.System#Collections#IList#IsFixedSize
Gets a value indicating whether the group collection has a fixed size.
Returns
true always.
System.Text.RegularExpressions.GroupCollection.System#Collections#IList#Item()
Gets the group in the desired position.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-index position of the group in the group collection. |
Returns
The group in the desired position.
System.Text.RegularExpressions.GroupCollection.Values
Gets a group enumeration with all the groups in the group collection.
Returns
A group enumeration.
System.Text.RegularExpressions.Match
Represents the results from a single regular expression match.
System.Text.RegularExpressions.Match.NextMatch
Returns a new System.Text.RegularExpressions.Match object with the results for the next match, starting at the position at which the last match ended (at the character after the last matched character).
Returns
The next regular expression match.
System.Text.RegularExpressions.Match.Result()
Returns the expansion of the specified replacement pattern.
Parameters
| Name | Description | Default |
|---|---|---|
replacement |
The replacement pattern to use. |
Returns
The expanded version of the replacement parameter.
System.Text.RegularExpressions.Match.Synchronized()
Returns a System.Text.RegularExpressions.Match instance equivalent to the one supplied that is suitable to share between multiple threads.
Parameters
| Name | Description | Default |
|---|---|---|
inner |
A regular expression match equivalent to the one expected. |
Returns
A regular expression match that is suitable to share between multiple threads.
System.Text.RegularExpressions.Match.Empty
Gets the empty group. All failed matches return this empty match.
Returns
An empty match.
System.Text.RegularExpressions.Match.Groups
Gets a collection of groups matched by the regular expression.
Returns
The character groups matched by the pattern.
System.Text.RegularExpressions.MatchCollection
Represents the set of successful matches found by iteratively applying a regular expression pattern to the input string. The collection is immutable (read-only) and has no public constructor. The System.Text.RegularExpressions.Regex.Matches() method returns a System.Text.RegularExpressions.MatchCollection object.
System.Text.RegularExpressions.MatchCollection.CopyTo()
Copies all the elements of the collection to the given array starting at the given index.
Parameters
| Name | Description | Default |
|---|---|---|
array |
The array the collection is to be copied into. | |
arrayIndex |
The position in the array where copying is to begin. |
System.Text.RegularExpressions.MatchCollection.CopyTo()
Copies the elements of the collection to an System.Array, starting at a particular System.Array index.
Parameters
| Name | Description | Default |
|---|---|---|
array |
The one-dimensional System.Array that is the destination of the elements copied from the collection. The System.Array must have zero-based indexing. | |
arrayIndex |
The zero-based index in array at which copying begins. |
System.Text.RegularExpressions.MatchCollection.GetEnumerator
Provides an enumerator that iterates through the collection.
Returns
An object that contains all System.Text.RegularExpressions.Match objects within the System.Text.RegularExpressions.MatchCollection.
System.Text.RegularExpressions.MatchCollection.System#Collections#Generic#ICollection{System#Text#RegularExpressions#Match}#Add()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
item |
The object to add to the collection. |
System.Text.RegularExpressions.MatchCollection.System#Collections#Generic#ICollection{System#Text#RegularExpressions#Match}#Clear
Calling this method always throws System.NotSupportedException.
System.Text.RegularExpressions.MatchCollection.System#Collections#Generic#ICollection{System#Text#RegularExpressions#Match}#Contains()
Determines whether the collection contains a specific value.
Parameters
| Name | Description | Default |
|---|---|---|
item |
The object to locate in the collection. |
Returns
System.Text.RegularExpressions.MatchCollection.System#Collections#Generic#ICollection{System#Text#RegularExpressions#Match}#Remove()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
item |
The object to remove from the collection. |
Returns
System.Text.RegularExpressions.MatchCollection.System#Collections#Generic#IEnumerable{System#Text#RegularExpressions#Match}#GetEnumerator
Returns an enumerator that iterates through the collection.
Returns
An enumerator that can be used to iterate through the collection.
System.Text.RegularExpressions.MatchCollection.System#Collections#Generic#IList{System#Text#RegularExpressions#Match}#IndexOf()
Determines the index of a specific item in the collection.
Parameters
| Name | Description | Default |
|---|---|---|
item |
The object to locate in the collection. |
Returns
The index of item if found in the list; otherwise, -1.
System.Text.RegularExpressions.MatchCollection.System#Collections#Generic#IList{System#Text#RegularExpressions#Match}#Insert()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index at which item should be inserted. | |
item |
The object to insert into the collection. |
System.Text.RegularExpressions.MatchCollection.System#Collections#Generic#IList{System#Text#RegularExpressions#Match}#RemoveAt()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index of the item to remove. |
System.Text.RegularExpressions.MatchCollection.System#Collections#IList#Add()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
value |
The object to add to the collection. |
Returns
Calling this method always throws System.NotSupportedException.
System.Text.RegularExpressions.MatchCollection.System#Collections#IList#Clear
Removes all items from the collection.
System.Text.RegularExpressions.MatchCollection.System#Collections#IList#Contains()
Determines whether the collection contains a specific value.
Parameters
| Name | Description | Default |
|---|---|---|
value |
The object to locate in the collection. |
Returns
System.Text.RegularExpressions.MatchCollection.System#Collections#IList#IndexOf()
Determines the index of a specific item in the collection.
Parameters
| Name | Description | Default |
|---|---|---|
value |
The object to locate in the collection. |
Returns
The index of value if found in the list; otherwise, -1.
System.Text.RegularExpressions.MatchCollection.System#Collections#IList#Insert()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index at which value should be inserted. | |
value |
The object to insert into the collection. |
System.Text.RegularExpressions.MatchCollection.System#Collections#IList#Remove()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
value |
The object to remove from the collection. |
System.Text.RegularExpressions.MatchCollection.System#Collections#IList#RemoveAt()
Calling this method always throws System.NotSupportedException.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index of the item to remove. |
System.Text.RegularExpressions.MatchCollection.Count
Gets the number of matches.
Returns
The number of matches.
System.Text.RegularExpressions.MatchCollection.IsReadOnly
Gets a value that indicates whether the collection is read only.
Returns
true in all cases.
System.Text.RegularExpressions.MatchCollection.IsSynchronized
Gets a value indicating whether access to the collection is synchronized (thread-safe).
Returns
false in all cases.
System.Text.RegularExpressions.MatchCollection.Item()
Gets an individual member of the collection.
Parameters
| Name | Description | Default |
|---|---|---|
i |
Index into the System.Text.RegularExpressions.Match collection. |
Returns
The captured substring at position i in the collection.
System.Text.RegularExpressions.MatchCollection.SyncRoot
Gets an object that can be used to synchronize access to the collection.
Returns
An object that can be used to synchronize access to the collection. This property always returns the object itself.
System.Text.RegularExpressions.MatchCollection.System#Collections#Generic#IList{System#Text#RegularExpressions#Match}#Item()
Gets the element at the specified index.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index of the element to get. |
Returns
The element at the specified index.
System.Text.RegularExpressions.MatchCollection.System#Collections#IList#IsFixedSize
Gets a value indicating whether the collection has a fixed size.
Returns
true.
System.Text.RegularExpressions.MatchCollection.System#Collections#IList#Item()
Gets the element at the specified index.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The zero-based index of the element to get. |
Returns
The element at the specified index.
System.Text.RegularExpressions.MatchEvaluator
Represents the method that is called each time a regular expression match is found during a System.Text.RegularExpressions.Regex.Replace method operation.
Parameters
| Name | Description | Default |
|---|---|---|
match |
The System.Text.RegularExpressions.Match object that represents a single regular expression match during a System.Text.RegularExpressions.Regex.Replace method operation. |
Returns
A string returned by the method that is represented by the System.Text.RegularExpressions.MatchEvaluator delegate.
System.Text.RegularExpressions.Regex
Represents an immutable regular expression.
System.Text.RegularExpressions.Regex.capnames
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.Regex.caps
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.Regex.capsize
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.Regex.capslist
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.Regex.factory
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.Regex.InfiniteMatchTimeout
Specifies that a pattern-matching operation should not time out.
System.Text.RegularExpressions.Regex.internalMatchTimeout
The maximum amount of time that can elapse in a pattern-matching operation before the operation times out.
System.Text.RegularExpressions.Regex.pattern
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.Regex.roptions
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.Regex.#ctor
Initializes a new instance of the System.Text.RegularExpressions.Regex class.
System.Text.RegularExpressions.Regex.#ctor()
Initializes a new instance of the System.Text.RegularExpressions.Regex class by using serialized data.
Parameters
| Name | Description | Default |
|---|---|---|
info |
The object that contains a serialized pattern and System.Text.RegularExpressions.RegexOptions information. | |
context |
The destination for this serialization. (This parameter is not used; specify null.) |
System.Text.RegularExpressions.Regex.#ctor()
Initializes a new instance of the System.Text.RegularExpressions.Regex class for the specified regular expression.
Parameters
| Name | Description | Default |
|---|---|---|
pattern |
The regular expression pattern to match. |
System.Text.RegularExpressions.Regex.#ctor()
Initializes a new instance of the System.Text.RegularExpressions.Regex class for the specified regular expression, with options that modify the pattern.
Parameters
| Name | Description | Default |
|---|---|---|
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that modify the regular expression. |
System.Text.RegularExpressions.Regex.#ctor()
Initializes a new instance of the System.Text.RegularExpressions.Regex class for the specified regular expression, with options that modify the pattern and a value that specifies how long a pattern matching method should attempt a match before it times out.
Parameters
| Name | Description | Default |
|---|---|---|
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that modify the regular expression. | |
matchTimeout |
A time-out interval, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout to indicate that the method should not time out. |
System.Text.RegularExpressions.Regex.CompileToAssembly()
Compiles one or more specified System.Text.RegularExpressions.Regex objects to a named assembly.
Parameters
| Name | Description | Default |
|---|---|---|
regexinfos |
An array that describes the regular expressions to compile. | |
assemblyname |
The file name of the assembly. |
System.Text.RegularExpressions.Regex.CompileToAssembly()
Compiles one or more specified System.Text.RegularExpressions.Regex objects to a named assembly with the specified attributes.
Parameters
| Name | Description | Default |
|---|---|---|
regexinfos |
An array that describes the regular expressions to compile. | |
assemblyname |
The file name of the assembly. | |
attributes |
An array that defines the attributes to apply to the assembly. |
System.Text.RegularExpressions.Regex.CompileToAssembly()
Compiles one or more specified System.Text.RegularExpressions.Regex objects and a specified resource file to a named assembly with the specified attributes.
Parameters
| Name | Description | Default |
|---|---|---|
regexinfos |
An array that describes the regular expressions to compile. | |
assemblyname |
The file name of the assembly. | |
attributes |
An array that defines the attributes to apply to the assembly. | |
resourceFile |
The name of the Win32 resource file to include in the assembly. |
System.Text.RegularExpressions.Regex.Count()
Searches an input span for all occurrences of a regular expression and returns the number of matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. |
Returns
The number of matches.
System.Text.RegularExpressions.Regex.Count()
Searches an input span for all occurrences of a regular expression and returns the number of matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. | |
startat |
The zero-based character position at which to start the search. |
Returns
The number of matches.
System.Text.RegularExpressions.Regex.Count()
Searches an input span for all occurrences of a regular expression and returns the number of matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. | |
pattern |
The regular expression pattern to match. |
Returns
The number of matches.
System.Text.RegularExpressions.Regex.Count()
Searches an input span for all occurrences of a regular expression and returns the number of matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that specify options for matching. |
Returns
The number of matches.
System.Text.RegularExpressions.Regex.Count()
Searches an input span for all occurrences of a regular expression and returns the number of matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that specify options for matching. | |
matchTimeout |
A time-out interval, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout to indicate that the method should not time out. |
Returns
The number of matches.
System.Text.RegularExpressions.Regex.Count()
Searches an input string for all occurrences of a regular expression and returns the number of matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. |
Returns
The number of matches.
System.Text.RegularExpressions.Regex.Count()
Searches an input string for all occurrences of a regular expression and returns the number of matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. |
Returns
The number of matches.
System.Text.RegularExpressions.Regex.Count()
Searches an input string for all occurrences of a regular expression and returns the number of matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that specify options for matching. |
Returns
The number of matches.
System.Text.RegularExpressions.Regex.Count()
Searches an input string for all occurrences of a regular expression and returns the number of matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that specify options for matching. | |
matchTimeout |
A time-out interval, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout to indicate that the method should not time out. |
Returns
The number of matches.
System.Text.RegularExpressions.Regex.EnumerateMatches()
Searches an input span for all occurrences of a regular expression and returns a System.Text.RegularExpressions.Regex.ValueMatchEnumerator to iterate over the matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. |
Returns
A System.Text.RegularExpressions.Regex.ValueMatchEnumerator to iterate over the matches.
System.Text.RegularExpressions.Regex.EnumerateMatches()
Searches an input span for all occurrences of a regular expression and returns a System.Text.RegularExpressions.Regex.ValueMatchEnumerator to iterate over the matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. | |
startat |
The zero-based character position at which to start the search. |
Returns
A System.Text.RegularExpressions.Regex.ValueMatchEnumerator to iterate over the matches.
System.Text.RegularExpressions.Regex.EnumerateMatches()
Searches an input span for all occurrences of a regular expression and returns a System.Text.RegularExpressions.Regex.ValueMatchEnumerator to iterate over the matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. | |
pattern |
The regular expression pattern to match. |
Returns
A System.Text.RegularExpressions.Regex.ValueMatchEnumerator to iterate over the matches.
System.Text.RegularExpressions.Regex.EnumerateMatches()
Searches an input span for all occurrences of a regular expression and returns a System.Text.RegularExpressions.Regex.ValueMatchEnumerator to iterate over the matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that specify options for matching. |
Returns
A System.Text.RegularExpressions.Regex.ValueMatchEnumerator to iterate over the matches.
System.Text.RegularExpressions.Regex.EnumerateMatches()
Searches an input span for all occurrences of a regular expression and returns a System.Text.RegularExpressions.Regex.ValueMatchEnumerator to iterate over the matches.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that specify options for matching. | |
matchTimeout |
A time-out interval, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout to indicate that the method should not time out. |
Returns
A System.Text.RegularExpressions.Regex.ValueMatchEnumerator to iterate over the matches.
System.Text.RegularExpressions.Regex.Escape()
Escapes a minimal set of characters (\, *, +, ?, |, {, [, (,), ^, $, ., #, and white space) by replacing them with their escape codes. This instructs the regular expression engine to interpret these characters literally rather than as metacharacters.
Parameters
| Name | Description | Default |
|---|---|---|
str |
The input string that contains the text to convert. |
Returns
A string of characters with metacharacters converted to their escaped form.
System.Text.RegularExpressions.Regex.GetGroupNames
Returns an array of capturing group names for the regular expression.
Returns
A string array of group names.
System.Text.RegularExpressions.Regex.GetGroupNumbers
Returns an array of capturing group numbers that correspond to group names in an array.
Returns
An integer array of group numbers.
System.Text.RegularExpressions.Regex.GroupNameFromNumber()
Gets the group name that corresponds to the specified group number.
Parameters
| Name | Description | Default |
|---|---|---|
i |
The group number to convert to the corresponding group name. |
Returns
A string that contains the group name associated with the specified group number. If there is no group name that corresponds to i, the method returns System.String.Empty.
System.Text.RegularExpressions.Regex.GroupNumberFromName()
Returns the group number that corresponds to the specified group name.
Parameters
| Name | Description | Default |
|---|---|---|
name |
The group name to convert to the corresponding group number. |
Returns
The group number that corresponds to the specified group name, or -1 if name is not a valid group name.
System.Text.RegularExpressions.Regex.InitializeReferences
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.Regex.IsMatch()
Indicates whether the regular expression specified in the Regex constructor finds a match in a specified input span.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. |
Returns
System.Text.RegularExpressions.Regex.IsMatch()
Indicates whether the regular expression specified in the Regex constructor finds a match in a specified input span.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. | |
startat |
The zero-based character position at which to start the search. |
Returns
System.Text.RegularExpressions.Regex.IsMatch()
Indicates whether the specified regular expression finds a match in the specified input span.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. | |
pattern |
The regular expression pattern to match. |
Returns
System.Text.RegularExpressions.Regex.IsMatch()
Indicates whether the specified regular expression finds a match in the specified input span, using the specified matching options.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that provide options for matching. |
Returns
System.Text.RegularExpressions.Regex.IsMatch()
Indicates whether the specified regular expression finds a match in the specified input span, using the specified matching options and time-out interval.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The span to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that provide options for matching. | |
matchTimeout |
A time-out interval, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout to indicate that the method should not time out. |
Returns
System.Text.RegularExpressions.Regex.IsMatch()
Indicates whether the regular expression specified in the System.Text.RegularExpressions.Regex constructor finds a match in a specified input string.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. |
Returns
System.Text.RegularExpressions.Regex.IsMatch()
Indicates whether the regular expression specified in the System.Text.RegularExpressions.Regex constructor finds a match in the specified input string, beginning at the specified starting position in the string.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
startat |
The character position at which to start the search. |
Returns
System.Text.RegularExpressions.Regex.IsMatch()
Indicates whether the specified regular expression finds a match in the specified input string.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. |
Returns
System.Text.RegularExpressions.Regex.IsMatch()
Indicates whether the specified regular expression finds a match in the specified input string, using the specified matching options.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that provide options for matching. |
Returns
System.Text.RegularExpressions.Regex.IsMatch()
Indicates whether the specified regular expression finds a match in the specified input string, using the specified matching options and time-out interval.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that provide options for matching. | |
matchTimeout |
A time-out interval, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout to indicate that the method should not time out. |
Returns
System.Text.RegularExpressions.Regex.Match()
Searches the specified input string for the first occurrence of the regular expression specified in the System.Text.RegularExpressions.Regex constructor.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. |
Returns
An object that contains information about the match.
System.Text.RegularExpressions.Regex.Match()
Searches the input string for the first occurrence of a regular expression, beginning at the specified starting position in the string.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
startat |
The zero-based character position at which to start the search. |
Returns
An object that contains information about the match.
System.Text.RegularExpressions.Regex.Match()
Searches the input string for the first occurrence of a regular expression, beginning at the specified starting position and searching only the specified number of characters.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
beginning |
The zero-based character position in the input string that defines the leftmost position to be searched. | |
length |
The number of characters in the substring to include in the search. |
Returns
An object that contains information about the match.
System.Text.RegularExpressions.Regex.Match()
Searches the specified input string for the first occurrence of the specified regular expression.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. |
Returns
An object that contains information about the match.
System.Text.RegularExpressions.Regex.Match()
Searches the input string for the first occurrence of the specified regular expression, using the specified matching options.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that provide options for matching. |
Returns
An object that contains information about the match.
System.Text.RegularExpressions.Regex.Match()
Searches the input string for the first occurrence of the specified regular expression, using the specified matching options and time-out interval.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that provide options for matching. | |
matchTimeout |
A time-out interval, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout to indicate that the method should not time out. |
Returns
An object that contains information about the match.
System.Text.RegularExpressions.Regex.Matches()
Searches the specified input string for all occurrences of a regular expression.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. |
Returns
A collection of the System.Text.RegularExpressions.Match objects found by the search. If no matches are found, the method returns an empty collection object.
System.Text.RegularExpressions.Regex.Matches()
Searches the specified input string for all occurrences of a regular expression, beginning at the specified starting position in the string.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
startat |
The character position in the input string at which to start the search. |
Returns
A collection of the System.Text.RegularExpressions.Match objects found by the search. If no matches are found, the method returns an empty collection object.
System.Text.RegularExpressions.Regex.Matches()
Searches the specified input string for all occurrences of a specified regular expression.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. |
Returns
A collection of the System.Text.RegularExpressions.Match objects found by the search. If no matches are found, the method returns an empty collection object.
System.Text.RegularExpressions.Regex.Matches()
Searches the specified input string for all occurrences of a specified regular expression, using the specified matching options.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that specify options for matching. |
Returns
A collection of the System.Text.RegularExpressions.Match objects found by the search. If no matches are found, the method returns an empty collection object.
System.Text.RegularExpressions.Regex.Matches()
Searches the specified input string for all occurrences of a specified regular expression, using the specified matching options and time-out interval.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that specify options for matching. | |
matchTimeout |
A time-out interval, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout to indicate that the method should not time out. |
Returns
A collection of the System.Text.RegularExpressions.Match objects found by the search. If no matches are found, the method returns an empty collection object.
System.Text.RegularExpressions.Regex.Replace()
In a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
replacement |
The replacement string. |
Returns
A new string that is identical to the input string, except that the replacement string takes the place of each matched string. If the regular expression pattern is not matched in the current instance, the method returns the current instance unchanged.
System.Text.RegularExpressions.Regex.Replace()
In a specified input string, replaces a specified maximum number of strings that match a regular expression pattern with a specified replacement string.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
replacement |
The replacement string. | |
count |
The maximum number of times the replacement can occur. |
Returns
A new string that is identical to the input string, except that the replacement string takes the place of each matched string. If the regular expression pattern is not matched in the current instance, the method returns the current instance unchanged.
System.Text.RegularExpressions.Regex.Replace()
In a specified input substring, replaces a specified maximum number of strings that match a regular expression pattern with a specified replacement string.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
replacement |
The replacement string. | |
count |
Maximum number of times the replacement can occur. | |
startat |
The character position in the input string where the search begins. |
Returns
A new string that is identical to the input string, except that the replacement string takes the place of each matched string. If the regular expression pattern is not matched in the current instance, the method returns the current instance unchanged.
System.Text.RegularExpressions.Regex.Replace()
In a specified input string, replaces all strings that match a specified regular expression with a specified replacement string.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
replacement |
The replacement string. |
Returns
A new string that is identical to the input string, except that the replacement string takes the place of each matched string. If pattern is not matched in the current instance, the method returns the current instance unchanged.
System.Text.RegularExpressions.Regex.Replace()
In a specified input string, replaces all strings that match a specified regular expression with a specified replacement string. Specified options modify the matching operation.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
replacement |
The replacement string. | |
options |
A bitwise combination of the enumeration values that provide options for matching. |
Returns
A new string that is identical to the input string, except that the replacement string takes the place of each matched string. If pattern is not matched in the current instance, the method returns the current instance unchanged.
System.Text.RegularExpressions.Regex.Replace()
In a specified input string, replaces all strings that match a specified regular expression with a specified replacement string. Additional parameters specify options that modify the matching operation and a time-out interval if no match is found.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
replacement |
The replacement string. | |
options |
A bitwise combination of the enumeration values that provide options for matching. | |
matchTimeout |
A time-out interval, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout to indicate that the method should not time out. |
Returns
A new string that is identical to the input string, except that the replacement string takes the place of each matched string. If pattern is not matched in the current instance, the method returns the current instance unchanged.
System.Text.RegularExpressions.Regex.Replace()
In a specified input string, replaces all strings that match a specified regular expression with a string returned by a System.Text.RegularExpressions.MatchEvaluator delegate.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
evaluator |
A custom method that examines each match and returns either the original matched string or a replacement string. |
Returns
A new string that is identical to the input string, except that a replacement string takes the place of each matched string. If pattern is not matched in the current instance, the method returns the current instance unchanged.
System.Text.RegularExpressions.Regex.Replace()
In a specified input string, replaces all strings that match a specified regular expression with a string returned by a System.Text.RegularExpressions.MatchEvaluator delegate. Specified options modify the matching operation.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
evaluator |
A custom method that examines each match and returns either the original matched string or a replacement string. | |
options |
A bitwise combination of the enumeration values that provide options for matching. |
Returns
A new string that is identical to the input string, except that a replacement string takes the place of each matched string. If pattern is not matched in the current instance, the method returns the current instance unchanged.
System.Text.RegularExpressions.Regex.Replace()
In a specified input string, replaces all substrings that match a specified regular expression with a string returned by a System.Text.RegularExpressions.MatchEvaluator delegate. Additional parameters specify options that modify the matching operation and a time-out interval if no match is found.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
pattern |
The regular expression pattern to match. | |
evaluator |
A custom method that examines each match and returns either the original matched string or a replacement string. | |
options |
A bitwise combination of enumeration values that provide options for matching. | |
matchTimeout |
A time-out interval, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout to indicate that the method should not time out. |
Returns
A new string that is identical to the input string, except that the replacement string takes the place of each matched string. If pattern is not matched in the current instance, the method returns the current instance unchanged.
System.Text.RegularExpressions.Regex.Replace()
In a specified input string, replaces all strings that match a specified regular expression with a string returned by a System.Text.RegularExpressions.MatchEvaluator delegate.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
evaluator |
A custom method that examines each match and returns either the original matched string or a replacement string. |
Returns
A new string that is identical to the input string, except that a replacement string takes the place of each matched string. If the regular expression pattern is not matched in the current instance, the method returns the current instance unchanged.
System.Text.RegularExpressions.Regex.Replace()
In a specified input string, replaces a specified maximum number of strings that match a regular expression pattern with a string returned by a System.Text.RegularExpressions.MatchEvaluator delegate.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
evaluator |
A custom method that examines each match and returns either the original matched string or a replacement string. | |
count |
The maximum number of times the replacement will occur. |
Returns
A new string that is identical to the input string, except that a replacement string takes the place of each matched string. If the regular expression pattern is not matched in the current instance, the method returns the current instance unchanged.
System.Text.RegularExpressions.Regex.Replace()
In a specified input substring, replaces a specified maximum number of strings that match a regular expression pattern with a string returned by a System.Text.RegularExpressions.MatchEvaluator delegate.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to search for a match. | |
evaluator |
A custom method that examines each match and returns either the original matched string or a replacement string. | |
count |
The maximum number of times the replacement will occur. | |
startat |
The character position in the input string where the search begins. |
Returns
A new string that is identical to the input string, except that a replacement string takes the place of each matched string. If the regular expression pattern is not matched in the current instance, the method returns the current instance unchanged.
System.Text.RegularExpressions.Regex.Split()
Splits an input string into an array of substrings at the positions defined by a regular expression pattern specified in the System.Text.RegularExpressions.Regex constructor.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to split. |
Returns
An array of strings.
System.Text.RegularExpressions.Regex.Split()
Splits an input string a specified maximum number of times into an array of substrings, at the positions defined by a regular expression specified in the System.Text.RegularExpressions.Regex constructor.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to be split. | |
count |
The maximum number of times the split can occur. |
Returns
An array of strings.
System.Text.RegularExpressions.Regex.Split()
Splits an input string a specified maximum number of times into an array of substrings, at the positions defined by a regular expression specified in the System.Text.RegularExpressions.Regex constructor. The search for the regular expression pattern starts at a specified character position in the input string.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to be split. | |
count |
The maximum number of times the split can occur. | |
startat |
The character position in the input string where the search will begin. |
Returns
An array of strings.
System.Text.RegularExpressions.Regex.Split()
Splits an input string into an array of substrings at the positions defined by a regular expression pattern.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to split. | |
pattern |
The regular expression pattern to match. |
Returns
An array of strings.
System.Text.RegularExpressions.Regex.Split()
Splits an input string into an array of substrings at the positions defined by a specified regular expression pattern. Specified options modify the matching operation.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to split. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that provide options for matching. |
Returns
An array of strings.
System.Text.RegularExpressions.Regex.Split()
Splits an input string into an array of substrings at the positions defined by a specified regular expression pattern. Additional parameters specify options that modify the matching operation and a time-out interval if no match is found.
Parameters
| Name | Description | Default |
|---|---|---|
input |
The string to split. | |
pattern |
The regular expression pattern to match. | |
options |
A bitwise combination of the enumeration values that provide options for matching. | |
matchTimeout |
A time-out interval, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout to indicate that the method should not time out. |
Returns
A string array.
System.Text.RegularExpressions.Regex.System#Runtime#Serialization#ISerializable#GetObjectData()
Populates a System.Runtime.Serialization.SerializationInfo object with the data necessary to deserialize the current System.Text.RegularExpressions.Regex object.
Parameters
| Name | Description | Default |
|---|---|---|
si |
The object to populate with serialization information. | |
context |
The place to store and retrieve serialized data. This parameter is reserved for future use. |
System.Text.RegularExpressions.Regex.ToString
Returns the regular expression pattern that was passed into the Regex constructor.
Returns
The pattern parameter that was passed into the Regex constructor.
System.Text.RegularExpressions.Regex.Unescape()
Converts any escaped characters in the input string.
Parameters
| Name | Description | Default |
|---|---|---|
str |
The input string containing the text to convert. |
Returns
A string of characters with any escaped characters converted to their unescaped form.
System.Text.RegularExpressions.Regex.UseOptionC
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Returns
true if the System.Text.RegularExpressions.Regex.Options property contains the System.Text.RegularExpressions.RegexOptions.Compiled option; otherwise, false.
System.Text.RegularExpressions.Regex.UseOptionR
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Returns
true if the System.Text.RegularExpressions.Regex.Options property contains the System.Text.RegularExpressions.RegexOptions.RightToLeft option; otherwise, false.
System.Text.RegularExpressions.Regex.ValidateMatchTimeout()
Checks whether a time-out interval is within an acceptable range.
Parameters
| Name | Description | Default |
|---|---|---|
matchTimeout |
The time-out interval to check. |
System.Text.RegularExpressions.Regex.CacheSize
Gets or sets the maximum number of entries in the current static cache of compiled regular expressions.
Returns
The maximum number of entries in the static cache.
System.Text.RegularExpressions.Regex.CapNames
Gets or sets a dictionary that maps named capturing groups to their index values.
Returns
A dictionary that maps named capturing groups to their index values.
System.Text.RegularExpressions.Regex.Caps
Gets or sets a dictionary that maps numbered capturing groups to their index values.
Returns
A dictionary that maps numbered capturing groups to their index values.
System.Text.RegularExpressions.Regex.MatchTimeout
Gets the time-out interval of the current instance.
Returns
The maximum time interval that can elapse in a pattern-matching operation before a System.Text.RegularExpressions.RegexMatchTimeoutException is thrown, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout if time-outs are disabled.
System.Text.RegularExpressions.Regex.Options
Gets the options that were passed into the System.Text.RegularExpressions.Regex constructor.
Returns
One or more members of the System.Text.RegularExpressions.RegexOptions enumeration that represent options that were passed to the System.Text.RegularExpressions.Regex constructor.
System.Text.RegularExpressions.Regex.RightToLeft
Gets a value that indicates whether the regular expression searches from right to left.
Returns
System.Text.RegularExpressions.Regex.ValueMatchEnumerator
Represents an enumerator containing the set of successful matches found by iteratively applying a regular expression pattern to the input span.
System.Text.RegularExpressions.Regex.ValueMatchEnumerator.GetEnumerator
Provides an enumerator that iterates through the matches in the input span.
Returns
A copy of this enumerator.
System.Text.RegularExpressions.Regex.ValueMatchEnumerator.MoveNext
Advances the enumerator to the next match in the span.
Returns
System.Text.RegularExpressions.Regex.ValueMatchEnumerator.Current
Gets the System.Text.RegularExpressions.ValueMatch element at the current position of the enumerator.
System.Text.RegularExpressions.RegexCompilationInfo
Provides information about a regular expression that is used to compile a regular expression to a stand-alone assembly.
System.Text.RegularExpressions.RegexCompilationInfo.#ctor()
Initializes a new instance of the System.Text.RegularExpressions.RegexCompilationInfo class that contains information about a regular expression to be included in an assembly.
Parameters
| Name | Description | Default |
|---|---|---|
pattern |
The regular expression to compile. | |
options |
The regular expression options to use when compiling the regular expression. | |
name |
The name of the type that represents the compiled regular expression. | |
fullnamespace |
The namespace to which the new type belongs. | |
ispublic |
true to make the compiled regular expression publicly visible; otherwise, false. |
System.Text.RegularExpressions.RegexCompilationInfo.#ctor()
Initializes a new instance of the System.Text.RegularExpressions.RegexCompilationInfo class that contains information about a regular expression with a specified time-out value to be included in an assembly.
Parameters
| Name | Description | Default |
|---|---|---|
pattern |
The regular expression to compile. | |
options |
The regular expression options to use when compiling the regular expression. | |
name |
The name of the type that represents the compiled regular expression. | |
fullnamespace |
The namespace to which the new type belongs. | |
ispublic |
true to make the compiled regular expression publicly visible; otherwise, false. | |
matchTimeout |
The default time-out interval for the regular expression. |
System.Text.RegularExpressions.RegexCompilationInfo.IsPublic
Gets or sets a value that indicates whether the compiled regular expression has public visibility.
Returns
System.Text.RegularExpressions.RegexCompilationInfo.MatchTimeout
Gets or sets the regular expression's default time-out interval.
Returns
The default maximum time interval that can elapse in a pattern-matching operation before a System.Text.RegularExpressions.RegexMatchTimeoutException is thrown, or System.Text.RegularExpressions.Regex.InfiniteMatchTimeout if time-outs are disabled.
System.Text.RegularExpressions.RegexCompilationInfo.Name
Gets or sets the name of the type that represents the compiled regular expression.
Returns
The name of the new type.
System.Text.RegularExpressions.RegexCompilationInfo.Namespace
Gets or sets the namespace to which the new type belongs.
Returns
The namespace of the new type.
System.Text.RegularExpressions.RegexCompilationInfo.Options
Gets or sets the options to use when compiling the regular expression.
Returns
A bitwise combination of the enumeration values.
System.Text.RegularExpressions.RegexCompilationInfo.Pattern
Gets or sets the regular expression to compile.
Returns
The regular expression to compile.
System.Text.RegularExpressions.RegexMatchTimeoutException
The exception that is thrown when the execution time of a regular expression pattern-matching method exceeds its time-out interval.
System.Text.RegularExpressions.RegexMatchTimeoutException.#ctor
Initializes a new instance of the System.Text.RegularExpressions.RegexMatchTimeoutException class with a system-supplied message.
System.Text.RegularExpressions.RegexMatchTimeoutException.#ctor()
Initializes a new instance of the System.Text.RegularExpressions.RegexMatchTimeoutException class with serialized data.
Parameters
| Name | Description | Default |
|---|---|---|
info |
The object that contains the serialized data. | |
context |
The stream that contains the serialized data. |
System.Text.RegularExpressions.RegexMatchTimeoutException.#ctor()
Initializes a new instance of the System.Text.RegularExpressions.RegexMatchTimeoutException class with the specified message string.
Parameters
| Name | Description | Default |
|---|---|---|
message |
A string that describes the exception. |
System.Text.RegularExpressions.RegexMatchTimeoutException.#ctor()
Initializes a new instance of the System.Text.RegularExpressions.RegexMatchTimeoutException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Parameters
| Name | Description | Default |
|---|---|---|
message |
A string that describes the exception. | |
inner |
The exception that is the cause of the current exception. |
System.Text.RegularExpressions.RegexMatchTimeoutException.#ctor()
Initializes a new instance of the System.Text.RegularExpressions.RegexMatchTimeoutException class with information about the regular expression pattern, the input text, and the time-out interval.
Parameters
| Name | Description | Default |
|---|---|---|
regexInput |
The input text processed by the regular expression engine when the time-out occurred. | |
regexPattern |
The pattern used by the regular expression engine when the time-out occurred. | |
matchTimeout |
The time-out interval. |
System.Text.RegularExpressions.RegexMatchTimeoutException.System#Runtime#Serialization#ISerializable#GetObjectData()
Populates a System.Runtime.Serialization.SerializationInfo object with the data needed to serialize a System.Text.RegularExpressions.RegexMatchTimeoutException object.
Parameters
| Name | Description | Default |
|---|---|---|
info |
The serialization information object to populate with data. | |
context |
The destination for this serialization. |
System.Text.RegularExpressions.RegexMatchTimeoutException.Input
Gets the input text that the regular expression engine was processing when the time-out occurred.
Returns
The regular expression input text.
System.Text.RegularExpressions.RegexMatchTimeoutException.MatchTimeout
Gets the time-out interval for a regular expression match.
Returns
The time-out interval.
System.Text.RegularExpressions.RegexMatchTimeoutException.Pattern
Gets the regular expression pattern that was used in the matching operation when the time-out occurred.
Returns
The regular expression pattern.
System.Text.RegularExpressions.RegexOptions
Provides enumerated values to use to set regular expression options.
System.Text.RegularExpressions.RegexOptions.Compiled
Specifies that the regular expression is compiled to MSIL code, instead of being interpreted. Compiled regular expressions maximize run-time performance at the expense of initialization time. This value should not be assigned to the System.Text.RegularExpressions.RegexCompilationInfo.Options property when calling the System.Text.RegularExpressions.Regex.CompileToAssembly() method. For more information, see the "Compiled Regular Expressions" section in the Regular Expression Options article.
System.Text.RegularExpressions.RegexOptions.CultureInvariant
Specifies that cultural differences in language is ignored. For more information, see the "Comparison Using the Invariant Culture" section in the Regular Expression Options article.
System.Text.RegularExpressions.RegexOptions.ECMAScript
Enables ECMAScript-compliant behavior for the expression. This value can be used only in conjunction with the System.Text.RegularExpressions.RegexOptions.IgnoreCase, System.Text.RegularExpressions.RegexOptions.Multiline, and System.Text.RegularExpressions.RegexOptions.Compiled values. The use of this value with any other values results in an exception.
For more information on the System.Text.RegularExpressions.RegexOptions.ECMAScript option, see the "ECMAScript Matching Behavior" section in the Regular Expression Options article.
System.Text.RegularExpressions.RegexOptions.ExplicitCapture
Specifies that the only valid captures are explicitly named or numbered groups of the form (?<name>...). This allows unnamed parentheses to act as noncapturing groups without the syntactic clumsiness of the expression (?:...). For more information, see the "Explicit Captures Only" section in the Regular Expression Options article.
System.Text.RegularExpressions.RegexOptions.IgnoreCase
Specifies case-insensitive matching. For more information, see the "Case-Insensitive Matching " section in the Regular Expression Options article.
System.Text.RegularExpressions.RegexOptions.IgnorePatternWhitespace
Eliminates unescaped white space from the pattern and enables comments marked with #. However, this value does not affect or eliminate white space in character classes, numeric quantifiers, or tokens that mark the beginning of individual regular expression language elements. For more information, see the "Ignore White Space" section of the Regular Expression Options article.
System.Text.RegularExpressions.RegexOptions.Multiline
Multiline mode. Changes the meaning of ^ and $ so they match at the beginning and end, respectively, of any line, and not just the beginning and end of the entire string. For more information, see the "Multiline Mode" section in the Regular Expression Options article.
System.Text.RegularExpressions.RegexOptions.NonBacktracking
Enable matching using an approach that avoids backtracking and guarantees linear-time processing in the length of the input.
System.Text.RegularExpressions.RegexOptions.None
Specifies that no options are set. For more information about the default behavior of the regular expression engine, see the "Default Options" section in the Regular Expression Options article.
System.Text.RegularExpressions.RegexOptions.RightToLeft
Specifies that the search will be from right to left instead of from left to right. For more information, see the "Right-to-Left Mode" section in the Regular Expression Options article.
System.Text.RegularExpressions.RegexOptions.Singleline
Specifies single-line mode. Changes the meaning of the dot (.) so it matches every character (instead of every character except \n). For more information, see the "Single-line Mode" section in the Regular Expression Options article.
System.Text.RegularExpressions.RegexParseError
Specifies the detailed underlying reason why a System.Text.RegularExpressions.RegexParseException is thrown when a regular expression contains a parsing error.
System.Text.RegularExpressions.RegexParseError.AlternationHasComment
An alternation construct in a regular expression contains a comment.
System.Text.RegularExpressions.RegexParseError.AlternationHasMalformedCondition
An alternation in a regular expression has a malformed condition.
System.Text.RegularExpressions.RegexParseError.AlternationHasMalformedReference
An alternation construct in a regular expression contains a malformed reference.
System.Text.RegularExpressions.RegexParseError.AlternationHasNamedCapture
An alternation construct in a regular expression uses a named capture.
System.Text.RegularExpressions.RegexParseError.AlternationHasTooManyConditions
An alternation in a regular expression has too many conditions.
System.Text.RegularExpressions.RegexParseError.AlternationHasUndefinedReference
An alternation construct in a regular expression contains an undefined reference.
System.Text.RegularExpressions.RegexParseError.CaptureGroupNameInvalid
The group name of a captured group in a regular expression is invalid.
System.Text.RegularExpressions.RegexParseError.CaptureGroupOfZero
A regular expression defines a numbered subexpression named zero.
System.Text.RegularExpressions.RegexParseError.ExclusionGroupNotLast
A character class in a regular expression with an exclusion group is not the last part of the character class.
System.Text.RegularExpressions.RegexParseError.InsufficientClosingParentheses
A regular expression has a non-escaped left parenthesis, or misses a closing right parenthesis.
System.Text.RegularExpressions.RegexParseError.InsufficientOpeningParentheses
A regular expression has a non-escaped right parenthesis, or misses an opening left parenthesis.
System.Text.RegularExpressions.RegexParseError.InsufficientOrInvalidHexDigits
A hexadecimal escape sequence in a regular expression does not have enough digits, or contains invalid digits.
System.Text.RegularExpressions.RegexParseError.InvalidGroupingConstruct
A grouping construct in a regular expression is invalid or malformed.
System.Text.RegularExpressions.RegexParseError.InvalidUnicodePropertyEscape
A Unicode property escape in a regular expression is invalid or unknown.
System.Text.RegularExpressions.RegexParseError.MalformedNamedReference
A named reference in a regular expression is malformed.
System.Text.RegularExpressions.RegexParseError.MalformedUnicodePropertyEscape
A Unicode property escape is malformed.
System.Text.RegularExpressions.RegexParseError.MissingControlCharacter
A control character in a regular expression is missing.
System.Text.RegularExpressions.RegexParseError.NestedQuantifiersNotParenthesized
Repeated quantifiers on another quantifier inside a regular expression are not grouped in parentheses.
System.Text.RegularExpressions.RegexParseError.QuantifierAfterNothing
A quantifier in a regular expression is in a position where it cannot quantify anything, like at the beginning of a regular expression or in a group.
System.Text.RegularExpressions.RegexParseError.QuantifierOrCaptureGroupOutOfRange
A captured group or a quantifier in a regular expression is not within range, that is, it is larger than Int32.MaxValue.
System.Text.RegularExpressions.RegexParseError.ReversedCharacterRange
A character class in a regular expression contains an inverse character range, like z-a instead of a-z.
System.Text.RegularExpressions.RegexParseError.ReversedQuantifierRange
A quantifier range in a regular expression is inverse, like
{10,1} instead of (1,10}.
System.Text.RegularExpressions.RegexParseError.ShorthandClassInCharacterRange
A character-class in a regular expression contains a short-hand class that is not allowed inside a character class.
System.Text.RegularExpressions.RegexParseError.UndefinedNamedReference
A used named reference in a regular expression is not defined.
System.Text.RegularExpressions.RegexParseError.UndefinedNumberedReference
A used numbered reference in a regular expression is not defined.
System.Text.RegularExpressions.RegexParseError.UnescapedEndingBackslash
A regular expression ends with a non-escaped ending backslash.
System.Text.RegularExpressions.RegexParseError.Unknown
An unknown regular expression parse error.
System.Text.RegularExpressions.RegexParseError.UnrecognizedControlCharacter
A control character in a regular expression is not recognized.
System.Text.RegularExpressions.RegexParseError.UnrecognizedEscape
An escape character or sequence in a regular expression is invalid.
System.Text.RegularExpressions.RegexParseError.UnrecognizedUnicodeProperty
A unicode property in a regular expression is not recognized, or invalid.
System.Text.RegularExpressions.RegexParseError.UnterminatedBracket
A regular expression has a non-escaped left square bracket, or misses a closing right square bracket.
System.Text.RegularExpressions.RegexParseError.UnterminatedComment
A comment in a regular expression is not terminated.
System.Text.RegularExpressions.RegexParseException
An exception as a result of a parse error in a regular expression, with detailed information in the System.Text.RegularExpressions.RegexParseException.Error and System.Text.RegularExpressions.RegexParseException.Offset properties.
System.Text.RegularExpressions.RegexParseException.GetObjectData()
Sets the info object with the parameter name and additional exception information.
Parameters
| Name | Description | Default |
|---|---|---|
info |
The object that holds the serialized object data. | |
context |
The contextual information about the source or destination. |
System.Text.RegularExpressions.RegexParseException.Error
Gets the error that happened during parsing.
Returns
The error that occured during parsing.
System.Text.RegularExpressions.RegexParseException.Offset
Gets the zero-based character offset in the regular expression pattern where the parse error occurs.
Returns
The offset at which the parse error occurs.
System.Text.RegularExpressions.RegexRunner
The System.Text.RegularExpressions.RegexRunner class is the base class for compiled regular expressions.
System.Text.RegularExpressions.RegexRunner.runcrawl
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runcrawlpos
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runmatch
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runregex
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runstack
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runstackpos
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runtext
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runtextbeg
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runtextend
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runtextpos
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runtextstart
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runtrack
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runtrackcount
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.runtrackpos
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.#ctor
Initializes a new instance of the System.Text.RegularExpressions.RegexRunner class.
System.Text.RegularExpressions.RegexRunner.Capture()
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Parameters
| Name | Description | Default |
|---|---|---|
capnum |
A capture number. | |
start |
The starting position of the capture. | |
end |
The ending position of the capture. |
System.Text.RegularExpressions.RegexRunner.CharInClass()
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method. Determines whether a character is in a character class.
Parameters
| Name | Description | Default |
|---|---|---|
ch |
A character to test. | |
charClass |
The internal name of a character class. |
Returns
true if the ch parameter is in the character class specified by the charClass parameter.
System.Text.RegularExpressions.RegexRunner.CharInSet()
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Parameters
| Name | Description | Default |
|---|---|---|
ch |
A character. | |
set |
The character set. | |
category |
The character category. |
Returns
Returns System.Boolean.
System.Text.RegularExpressions.RegexRunner.CheckTimeout
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.Crawl()
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Parameters
| Name | Description | Default |
|---|---|---|
i |
A number to save. |
System.Text.RegularExpressions.RegexRunner.Crawlpos
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Returns
Returns System.Int32.
System.Text.RegularExpressions.RegexRunner.DoubleCrawl
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.DoubleStack
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.DoubleTrack
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.EnsureStorage
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.FindFirstChar
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Returns
Returns System.Boolean.
System.Text.RegularExpressions.RegexRunner.Go
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.InitTrackCount
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunner.IsBoundary()
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The possible boundary position. | |
startpos |
The starting position. | |
endpos |
The ending position. |
Returns
Returns System.Boolean.
System.Text.RegularExpressions.RegexRunner.IsECMABoundary()
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Parameters
| Name | Description | Default |
|---|---|---|
index |
The possible ECMA boundary position. | |
startpos |
The starting position. | |
endpos |
The ending position. |
Returns
Returns System.Boolean.
System.Text.RegularExpressions.RegexRunner.IsMatched()
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Parameters
| Name | Description | Default |
|---|---|---|
cap |
The capture number. |
Returns
Returns System.Boolean.
System.Text.RegularExpressions.RegexRunner.MatchIndex()
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Parameters
| Name | Description | Default |
|---|---|---|
cap |
The capture number. |
Returns
Returns System.Int32.
System.Text.RegularExpressions.RegexRunner.MatchLength()
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Parameters
| Name | Description | Default |
|---|---|---|
cap |
The capture number. |
Returns
Returns System.Int32.
System.Text.RegularExpressions.RegexRunner.Popcrawl
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Returns
Returns System.Int32.
System.Text.RegularExpressions.RegexRunner.Scan()
Used by a System.Text.RegularExpressions.Regex object to scan the input text looking for the next match.
Parameters
| Name | Description | Default |
|---|---|---|
text |
The text to scan for a pattern match. |
System.Text.RegularExpressions.RegexRunner.Scan()
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Parameters
| Name | Description | Default |
|---|---|---|
regex |
An instance of the regular expression engine. | |
text |
The text to scan for a pattern match. | |
textbeg |
The zero-based starting position in text at which the regular expression engine scans for a match. | |
textend |
The zero-based ending position in text at which the regular expression engine scans for a match. | |
textstart |
The zero-based starting position to scan for this match. | |
prevlen |
The number of characters in the previous match. | |
quick |
true to search for a match in quick mode; otherwise, false. |
Returns
A match.
System.Text.RegularExpressions.RegexRunner.Scan()
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Parameters
| Name | Description | Default |
|---|---|---|
regex |
An instance of the regular expression engine. | |
text |
The text to scan for a pattern match. | |
textbeg |
The zero-based starting position in text at which the regular expression engine scans for a match. | |
textend |
The zero-based ending position in text at which the regular expression engine scans for a match. | |
textstart |
The zero-based starting position to scan for this match. | |
prevlen |
The number of characters in the previous match. | |
quick |
true to search for a match in quick mode; otherwise, false. | |
timeout |
The timeout interval. |
Returns
A match.
System.Text.RegularExpressions.RegexRunner.TransferCapture()
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
Parameters
| Name | Description | Default |
|---|---|---|
capnum |
A capture number. | |
uncapnum |
A saved capture number. | |
start |
The starting position. | |
end |
The ending position. |
System.Text.RegularExpressions.RegexRunner.Uncapture
Used by a System.Text.RegularExpressions.Regex object generated by the System.Text.RegularExpressions.Regex.CompileToAssembly method.
System.Text.RegularExpressions.RegexRunnerFactory
Creates a System.Text.RegularExpressions.RegexRunner class for a compiled regular expression.
System.Text.RegularExpressions.RegexRunnerFactory.#ctor
Initializes a new instance of the System.Text.RegularExpressions.RegexRunnerFactory class.
System.Text.RegularExpressions.RegexRunnerFactory.CreateInstance
When overridden in a derived class, creates a System.Text.RegularExpressions.RegexRunner object for a specific compiled regular expression.
Returns
A System.Text.RegularExpressions.RegexRunner object designed to execute a specific compiled regular expression.
System.Text.RegularExpressions.ValueMatch
Represents the results from a single regular expression match.
System.Text.RegularExpressions.ValueMatch.Index
Gets the position in the original span where the first character of the captured sliced span is found.
System.Text.RegularExpressions.ValueMatch.Length
Gets the length of the captured sliced span.