دیدم بیکارم نوشتمش واقعا نمیدونم کجاش رو مونده بودید
textBox3.Text = string.Empty;
string searchtext = string.Empty;
int start = 0;
foreach (string item in textBox2.Lines)
{
if (item.Contains(@"</url><url><loc>http://test/search/?q="))
{
start = item.IndexOf(@"</url><url><loc>http://test/search/?q=") + @"</url><url><loc>http://test/search/?q=".Length;
searchtext = item.Substring(start, item.IndexOf(@"</loc>")-start)+" , ";
textBox3.Text += searchtext.Replace(@"+", " ");
}
}
یا
textBox3.Text = string.Empty;
foreach (string item in textBox2.Lines)
{
if (item.Contains(@"</url><url><loc>http://test/search/?q="))
{
textBox3.Text += item.Replace(@"</url><url><loc>http://test/search/?q=", "");
textBox3.Text = textBox3.Text.Replace(@"</loc><lastmod>2017-09-26</lastmod>", ",");
textBox3.Text = textBox3.Text.Replace(@"+", " ");
}
}