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";
List<string> text = ["89192864554","+7926?874?22?44", "vk@yandex.ru" , "vk.com", "youtube"];
List<string> phones = new List<string>(text.Where(x => x.StartWith("+") || x.StartWith("8")));
List<string> sites = new List<string>(text.Where(x => x.Contains(".") && !x.Contains("@")));
List<string> email = new List<string>(text.Where(x => x.Contins("@")));
List<string> text = new List<string>(new string[]{"+7920?855?43?55","+7926?874?22?44", "the-appbox.ru" , "vk.com", "+7898?55?6466"});
List<string> phones = new List<string>(text.Where(x => x.StartsWith("+")).Select(x => x.Replace("?","")));
List<string> sites = new List<string>(text.Where(x=>x.Contains(".")));
string phones_str = "";
string sites_str = "";
for (int i=0;i<phones.Count;i++) {
if (i == phones.Count-1)
{
phones_str += phones[i];
break;
}
phones_str += phones[i] + " ";
}
for (int i=0;i<sites.Count;i++) {
if (i == sites.Count-1)
{
sites_str += sites[i];
break;
}
sites_str += sites[i] + " ";
}
Console.WriteLine(phones_str);
Console.WriteLine(sites_str);
Console.ReadKey();
}