Separate string by tab characters

Jimmy picture Jimmy · May 9, 2010 · Viewed 84.6k times · Source

I have a text file that is tab-delimited. How can I separate this string into substrings for an array by detecting the tabs?

Answer

CD.. picture CD.. · May 9, 2010
string s = "123\t456\t789";
string[] split = s.Split('\t');