boost
头文件:#include<regex>
代码:
bool TfmRegister::IsEMailRight( String mail) //邮箱格式验证
{
const boost::regex pattern("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");
return boost::regex_match(mail.c_str(),pattern);
}
boost
头文件:#include<regex>
代码:
bool TfmRegister::IsEMailRight( String mail) //邮箱格式验证
{
const boost::regex pattern("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");
return boost::regex_match(mail.c_str(),pattern);
}