regex_search is not matching "ter" in "Computer Computer" when I'm using following code -
#include <iostream>
#include <regex>
using namespace std;
int main() {
string str("Computer Computer");
cout << regex_search(str, regex("ter"));
return 0;
}
The above code gives me 0, whereas there obviously is "ter" in the subject. So what is going on here. I know PHP's regex matches the substring just fine, but whats wrong here?
I'm using C++11 GCC, is that a problem since I read somewhere it has a poor support for regex.