答案 0 :(得分:0)
您可以使用RegEx
string input = "Person A(Owner), Person B(Group Manager)";
string[] result = System.Text.RegularExpressions.Regex.Matches(input, @"\w\(")
.Cast<Match>()
.Select(x => x.Value)
.ToArray();
// ["A(", "B(" ]
答案 1 :(得分:0)
如果文本的长度始终相同
然后尝试一下..
//store your words into input
string input = textbox1.text ;
string something = input.Substring(input.Length);
// collects letters from individual positions
string filtered = something[7]+something[8]+something[9]+something[10]+something[11]+something[12]+something[13];
label1.text = filtered.tostring(); // display the filtered stuff
这是一种方法。