NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Regex.Split (String)

Splits the input string at the position defined by a previous pattern.

[Visual Basic]
Overloads Public Function Split( _
   ByVal input As String _
) As String ()
[C#]
public string[] Split(
   string input
);
[C++]
public: String* Split(
   String* input
) [];
[JScript]
public function Split(
   input : String
) : String[];

Parameters

input
The string to be split.

Return Value

An array of sub-strings split from the input string.

Remarks

The Split methods are similar to String.Split, except that they split the string at a delimiter determined by a regular expression instead of a set of characters. If count is specified, the string is split into at most count strings (the last string containing the unsplit remainder of the string); a count value of zero provides the default behavior of splitting as many times as possible. If startat is specified, the first delimiter is searched for starting at the specified point (this can be used, for example, for skipping leading whitespace).

Notice that if the regular expression can match the empty string (e.g., x*), Split will split the string into an array of single-character strings, since the empty string delimiter can be found at every location.

See Also

Regex Class | Regex Members | System.Text.RegularExpressions Namespace | Regex.Split Overload List