BOOL CMailDlg::Validate() { CString m_sFrom; CString strRegex; System::String strRegex = "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}" + "\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\" + ".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"; System::Text::RegularExpressions::Regex ^_Regex = gcnew System::Text::RegularExpressions::Regex(strRegex); if (_Regex->IsMatch(m_sFrom)) return (true); else return (false); }
error C2653: 'System' : is not a class or namespace name<br /> error C2065: 'String' : undeclared identifier<br /> missing ';' before identifier 'strRegex'<br /> error C2110: cannot add two pointers<br /> error C2653: 'System' : is not a class or namespace name<br /> error C2065: 'Regex' : undeclared identifier<br /> error C2065: '_Regex' : undeclared identifier<br /> error C2065: 'gcnew' : undeclared identifier<br /> error C2653: 'System' : is not a class or namespace name<br /> error C2106: '=' : left operand must be l-value<br /> error C2146: syntax error : missing ';' before identifier 'Regex'<br /> error C2227: left of '->IsMatch' must point to class/struct/union
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)