求助:vs2008编译boost程序出错!!!急!
#include "stdafx.h"
#include <cstdlib>
#include <stdlib.h>
#include <boost/regex.hpp>
#include <string>
#include <iostream>
#include <windows.h>
using namespace std;
using namespace boost;
regex expression("^select (\d{1,3}\.){3}\d{1,3} from (\d{1,3}\.){3}\d{1,3} ");
int _tmain(int argc, _TCHAR* argv[])
{
std::string in;
cmatch what
int v1=2;
cout << "enter test string" << endl;
getline(cin,in);
if(regex_match(in.c_str(), what, expression))
{
for(int i=0;i<what.size();i++)
cout<<"str :"<<what[i].str()<<endl;
cin>>v1;
}
else
{
cout<<"Error Input"<<endl;
}
return 0;
}
警告: warning C4129: “d”: 不可识别的字符转义序列。
顺便问下我是想用正则表达式提取IP,这个程序有问题吗? 谢谢大家了。