C++ 정규표현식좀 봐주세요.
글쓴이: dltkddyd / 작성시간: 금, 2014/08/29 - 4:09오후
#include <iostream>
#include <string>
#include <regex>
int main ()
{
std::string s ("test subject");
std::smatch m;
std::regex e ("(sub)(.*)");
std::regex_search ( s, m, e );
cout<<m.size();
return 0;
}위와 같이 하면 m.size()가 3을 반환한다고 하는데, 제 gcc는 0을 반환하고 있습니다. 어디가 잘못된 건가요?
Forums:


댓글 달기