System::Text::RegularExpressions::Regex::Match method

Regex::Match(const String&) method

Matches regex against string.

MatchPtr System::Text::RegularExpressions::Regex::Match(const String &input)
ParameterTypeDescription
inputconst String&Target string.

ReturnValue

Match value containing match status and submatches.

See Also

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)
ParameterTypeDescription
inputconst String&Target string.
startatintBeginning index.
lengthintNumber of characters to look through (0 to look through the whole string).

ReturnValue

Match value containing match status and submatches.

See Also

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)
ParameterTypeDescription
inputconst String&Input string.
patternconst String&Regexp pattern.
optionsRegexOptionsMatching options.
matchTimeoutTimeSpanTimeout.
startatintMatch beginning position.
lengthintNumber of characters to look through (0 diables limit).

ReturnValue

First match found.

See Also