【开源中国 APP 全新上线】“动弹” 回归、集成大模型对话、畅读技术报告”
#include <regex>
#include <iostream>
#include <string>
bool is_email_valid(const std::string& email)
{
const std::regex pattern("(\\w+)(\\.|_)?(\\w*)@(\\w+)(\\.(\\w+))+");
return std::regex_match(email, pattern);
}
#include <regex>
#include <iostream>
#include <string>
bool is_email_valid(const std::string& email)
{
const std::regex pattern("(\\w+)(\\.|_)?(\\w*)@(\\w+)(\\.(\\w+))+");
return std::regex_match(email, pattern);
}