std::regex rgx1("(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}) (\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})");
std::regex rgx2("(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})");
std::smatch match;
if (std::regex_search(playerid, match, rgx1))
{
SF->LogFile("[EM]: Найдено 2 ip адреса", m);
findedip1 = match[1];
findedip2 = match[2];
SF->LogFile("[EM]: %s %s", findedip1.c_str(), findedip2.c_str());
return;
}
else if (std::regex_search(playerid, match, rgx2))
{
SF->LogFile("[EM]: Найден 1 ip адрес.");
findedip1 = match[1];
SF->LogFile("[EM]: %s", findedip1.c_str());
return;
}