Split()

Regex::Split(const String&) method

Splits string by regex matches.

ArrayPtr<String> System::Text::RegularExpressions::Regex::Split(const String &input)

Arguments

ParameterTypeDescription
inputconst String&String to split.

Return Value

Array of substrings between matches.

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

Splits string by regex matches.

ArrayPtr<String> System::Text::RegularExpressions::Regex::Split(const String &input, int count)

Arguments

ParameterTypeDescription
inputconst String&String to split.
countintNumber of substrings limit.

Return Value

Array of substrings between matches.

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

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 Regex constructor. The search for the regular expression pattern starts at a specified character position in the input string.

ArrayPtr<String> System::Text::RegularExpressions::Regex::Split(const String &input, int count, int startat)

Arguments

ParameterTypeDescription
inputconst String&The string to be split.
countintThe maximum number of times the split can occur.
startatintThe character position in the input string where the search will begin.

Return Value

An array of strings.

Regex::Split(const String&, const String&, RegexOptions, TimeSpan) method

Splits string by regexp.

static ArrayPtr<String> System::Text::RegularExpressions::Regex::Split(const String &input, const String &pattern, RegexOptions options=RegexOptions::None, TimeSpan matchTimeout=InfiniteMatchTimeout)

Arguments

ParameterTypeDescription
inputconst String&Input string.
patternconst String&Regexp pattern.
optionsRegexOptionsMatching options.
matchTimeoutTimeSpanTimeout.

Return Value

Array of strings between matchse.

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

Splits string by regexp.

static ArrayPtr<String> System::Text::RegularExpressions::Regex::Split(const String &input, const String &pattern, int count, RegexOptions options=RegexOptions::None, TimeSpan matchTimeout=InfiniteMatchTimeout)

Arguments

ParameterTypeDescription
inputconst String&Input string.
patternconst String&Regexp pattern.
countintMatch number limit.
optionsRegexOptionsMatching options.
matchTimeoutTimeSpanTimeout.

Return Value

Array of strings between matchse.

See Also