Home Cooker Classes Others Rice CookerGX
Classes  >  regex  >  Split(string)
regex class : Split(string) method

Description

Gets a list of substrings in the input string which is splitted with the regular expression.

Syntax

regexInstance.Split(string source)

Arguments

ClassNameDescription
stringsourceA string which is searched.

Return value

ClassDescription
list{string}a list of substrings in the input string which is splitted with the regular expression.

Sample code

//anyRegex is an any instance of regex type.

regex anyRegex = new regex("a+");

string result = anyRegex.Split("aaabbbaaccc");

Notes

It's a wrapper of the System.Text.RegularExpressions.Regex.Split(String).

Links for reference

Copyright © Rice All rights reserved.