List<string> text = ["89192864554","+7926?874?22?44", "vk@yandex.ru" , "vk.com", "youtube"];
string phone = "+7920?855?43?55 89192864554";
string site = "vk.com";
string email = "vk@yandex.ru";
class Program
{
public static string ParseToString(List<string> t)
{
string _return = "";
for(int i=0;i<t.Count;i++)
{
if (i == t.Count-1)
{
_return += t[i];
break;
}
_return += t[i] + " ";
}
return _return;
}
public static void Main(string[] args)
{
List<string> text = new List<string>(new String[]{"89192864554","+7926?874?22?44", "vk@yandex.ru" , "vk.com", "youtube"});
List<string> phones = new List<string>(text.Where(x => x.StartsWith("8") || x.StartsWith("+7")).Select(x => x.Replace("?","")));
List<string> sites = new List<string>(text.Where(x => x.Contains(".") && !x.Contains("@")));
List<string> emails = new List<string>(text.Where(x => x.Contains(".") && x.Contains("@")));
Console.WriteLine(ParseToString(phones));
Console.WriteLine(ParseToString(sites));
Console.WriteLine(ParseToString(emails));
Console.ReadKey();
}
}