Match()

Regex::Match(const String&) method

Matches regex against string.

MatchPtr System::Text::RegularExpressions::Regex::Match(const String &input)

Arguments

ParameterTypeDescription
inputconst String&Target string.

Return Value

Match value containing match status and submatches.

Regex::Match(const String&, int, int) method

Matches regex against string.

MatchPtr System::Text::RegularExpressions::Regex::Match(const String &input, int startat, int length=0)

Arguments

ParameterTypeDescription
inputconst String&Target string.
startatintBeginning index.
lengthintNumber of characters to look through (0 to look through the whole string).

Return Value

Match value containing match status and submatches.

Regex::Match(const String&, const String&, RegexOptions, TimeSpan, int, int) method

Matches string and pattern.

static MatchPtr System::Text::RegularExpressions::Regex::Match(const String &input, const String &pattern, RegexOptions options=RegexOptions::None, TimeSpan matchTimeout=InfiniteMatchTimeout, int startat=0, int length=0)

Arguments

ParameterTypeDescription
inputconst String&Input string.
patternconst String&Regexp pattern.
optionsRegexOptionsMatching options.
matchTimeoutTimeSpanTimeout.
startatintMatch beginning position.
lengthintNumber of characters to look through (0 diables limit).

Return Value

First match found.

See Also