C# > Text > Regular Expressions > Split
Splits an input string into an array of substrings at the positions defined by a regular expression pattern.
Splits an input string into an array of substrings at the positions defined by a regular expression pattern.
Example:
string path = "some_text_words";
string[] substrings = Regex.Split(path, "_");
foreach (string match in substrings)
{ }