class Match
A small helper class that describes a text search match returned by the Regex class.
Methods
string Format (const string) | Returns a formatted string from this match. |
Properties
int End () | Returns the zero-based position in the original text, where this match ends. |
int Length () | Returns the length of this match, in characters. |
int Start () | Returns the zero-based position in the original text, where this match begins. |
Match[] SubMatches () | Returns the sub-matches of this match. |
string Text () | Returns the text that matched with the regular expression. |
Reference
method string Format (const string format) |
Returns a formatted string from this match. The format string can contain references to sub-matches, where $0 represents the full match, $1 - $9 the sub-matches. |
accessor int End () |
Returns the zero-based position in the original text, where this match ends. |
accessor int Length () |
Returns the length of this match, in characters. |
accessor int Start () |
Returns the zero-based position in the original text, where this match begins. |
accessor Match[] SubMatches () |
Returns the sub-matches of this match. The first entry represents the full match, all remaining entries the sub-matches. The length of this array depends on the number of sub-matches that were actually used in the regular expression. |
accessor string Text () |
Returns the text that matched with the regular expression. |