Returns a value of the specified type for the match.
public static T Get<T>(this Match match)
parameter | description |
---|---|
T | The desired type. See RegexMatchExtensions for supported types. |
match | The match. |
The corresponding value of the specified type.
exception | condition |
---|---|
FormatException | The text of the capture cannot be parsed as the specified type. |
InvalidOperationException | The match failed, or the specified type is not supported. |
Returns a value of the specified type for the match.
public static T Get<T>(this Match match, params string[] groupNames)
parameter | description |
---|---|
T | The desired type. See RegexMatchExtensions for supported types. |
match | The match. |
groupNames | The group names to return. |
The corresponding value of the specified type.
exception | condition |
---|---|
FormatException | The text of the capture cannot be parsed as the specified type. |
InvalidOperationException | The match failed, or the specified type is not supported. |