if (regex_match("admin@gmail.com", regex("^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$")))
{
return true;
}
else
{
return false;
}
if (regex_match("admin@gmail.com", regex("/\S+@\S+/gm")))
{
return true;
}
else
{
return false;
}
if (regex_match("subject", regex("(sub)(.*)")))
{
return true;
}
else
{
return false;
}
bool Validation::checkLogin(string login)
{
bool result = false;
if (!login.empty())
{
regex pattern("/^[a-zA-Z0-9]{3,16}$/");
if (regex_match(login, pattern))
{
result = true;
}
}
return result;
}
[DllImport(
@"\\psf\iCloud\Education\C++ Lessons\ValidationDLL\Release\ValidationDLL.dll",
EntryPoint = "?checkLogin@Validation@eSportsDLL@@SA_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z",
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.Cdecl
)]
public static extern double checkLogin(string login);
Сам NewsList выглядит так: