KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Why does this find no matches in g++ (Debian 4.6.3-1) 4.6.3 or 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 ; } output false 0
Tags (comma-separated)
Save Edits
Cancel