Split String
string txt = "a | b"; string a = txt.Split(new string[] {" | "}, StringSplitOptions.None)[0];