Skip to content

Instantly share code, notes, and snippets.

@swkwon
Last active December 28, 2015 04:39
Show Gist options
  • Save swkwon/7443938 to your computer and use it in GitHub Desktop.
Save swkwon/7443938 to your computer and use it in GitHub Desktop.
string split
string test1 = "word1:word2";
string[] test1Result = test1.Split(':');
foreach (string s in test1Result)
{
Console.WriteLine(s);
}
string test2 = "word1<>word2";
string[] test2Result = System.Text.RegularExpressions.Regex.Split(test2, "<>");
foreach (string s in test2Result)
{
Console.WriteLine(s);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment