为什么在g ++(Debian 4.6.3-1)4.6.3或clang version 3.2(trunk 159457)中找不到匹配项
#include <iostream>
#include <string>
#include <regex>
using namespace std;
int main()
{
string line("test");
regex pattern("test",regex_constants::grep);
smatch result;
bool ret(false);
ret = regex_search(line,result,pattern);
cout << boolalpha << ret << endl;
cout << result.size() << endl;
return 0 ;
}
Run Code Online (Sandbox Code Playgroud)
产量
false
0
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4444 次 |
最近记录: |