This should work:
private void button1_Click(object sender, EventArgs e)
{
string[] qArray = getItemsBetween(txtResult.Text, "<q>", "</q>");
string[] o1Array = getItemsBetween(txtResult.Text, "<o1>", "</o1>");
string[] o2Array = getItemsBetween(txtResult.Text, "<o2>", "</o2>");
string[] o3Array = getItemsBetween(txtResult.Text, "<o3>", "</o3>");
string[] o4Array = getItemsBetween(txtResult.Text, "<o4>", "</o4>");
}
private string[] getItemsBetween(string input, string before, string after)
{
List<string> res = new List<string>();
foreach (string i in input.Split(new string[] { before }, StringSplitOptions.None))
if (i.Contains(after))
res.Add(i.Split(new string[] { after }, StringSplitOptions.None)[0]);
return res.ToArray();
}